Skip to content

Commit

Permalink
Task: Extracted out System Info bundle (#13887)
Browse files Browse the repository at this point in the history
* Extracted out System Info bundle
* Moved css to System info bundle
* Fixed bundle class names and integrated new menu system
* Removed bc layer for the extras menu
* Removed overridden getExtension method from bundle
* Update bundles/SystemInfoBundle/src/Controller/SettingsController.php
* move pimcore:system:requirements command
* Add Docs & Upgrade Notes
* Core tests should not depend on system info command
* new translation changes
* Updated types

Co-authored-by: Sebastian Blank <[email protected]>
Co-authored-by: Divesh Pahuja <[email protected]>
Co-authored-by: JiaJia Ji <[email protected]>
  • Loading branch information
4 people authored Jan 13, 2023
1 parent b376d52 commit a35ebca
Show file tree
Hide file tree
Showing 20 changed files with 1,524 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bundles/SystemInfoBundle/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4

[*.php]
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 4

[composer.json]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions bundles/SystemInfoBundle/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

* -text
68 changes: 68 additions & 0 deletions bundles/SystemInfoBundle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.DS_Store
Thumbs.db
*.log

# symfony default
/.web-server-pid
/app/config/parameters.yml
/build/
/phpunit.xml
/web/bundles/

# local config
!/app/config/local
/app/config/local/*
!app/config/local/.gitkeep

# pimcore legacy (remove this for your own development)
!/legacy
/legacy/*
!legacy/.gitkeep
!legacy/bundle

/var/*
!/var/.gitkeep
!/var/classes/
/var/classes/DataObject

!/var/config
/var/config/system.php
/var/config/debug-mode.php
/var/config/maintenance.php

# project specific recommendations
/var/config/tag-manager.php
/var/config/reports.php


/web/var/

# PHP-CS-Fixer
/.php_cs
/.php_cs.cache

# composer
/composer.lock
!/vendor
/vendor/*
!/vendor/.gitkeep

# PhpStorm / IDEA
.idea
.idea_modules
# NetBeans
nbproject

node_modules/

# codeception (only stage *.dist.yml config files)
/codeception.yml
/pimcore/codeception.yml
/pimcore/tests/*.suite.yml
/pimcore/tests/_output/*
/pimcore/tests/_support/_generated/*

# keep legacy paths ignored for easier migration
/plugins/
/tools/
/website/
71 changes: 71 additions & 0 deletions bundles/SystemInfoBundle/.php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src'])

// do not fix views
->notName('*.html.php');

return PhpCsFixer\Config::create()
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],

'header_comment' => [
'commentType' => 'PHPDoc',
'header' => 'Pimcore' . PHP_EOL . PHP_EOL .
'This source file is available under two different licenses:' . PHP_EOL .
'- GNU General Public License version 3 (GPLv3)' . PHP_EOL .
'- Pimcore Commercial License (PCL)' . PHP_EOL .
'Full copyright and license information is available in' . PHP_EOL .
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
PHP_EOL .
' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL .
' @license http://www.pimcore.org/license GPLv3 and PCL'
],

// keep aligned = and => operators as they are: do not force aligning, but do not remove it
'binary_operator_spaces' => ['align_double_arrow' => null, 'align_equals' => null],

'blank_line_before_return' => true,
'encoding' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'lowercase_cast' => true,
'magic_constant_casing' => true,
'method_argument_space' => ['ensure_fully_multiline' => false],
'method_separation' => true,
'native_function_casing' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_short_bool_cast' => true,
'no_spaces_around_offset' => true,
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'phpdoc_indent' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'return_type_declaration' => true,
'self_accessor' => true,
'short_scalar_cast' => true,
'single_blank_line_before_namespace' => true,
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder);
36 changes: 36 additions & 0 deletions bundles/SystemInfoBundle/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# License
Copyright (C) Pimcore GmbH

This software is available under two different licenses:
* GNU General Public License version 3 (GPLv3) as Pimcore Community Edition
* Pimcore Commercial License (PCL)

The default Pimcore license, without a valid Pimcore Commercial License agreement, is the Open-Source GPLv3 license.

## GNU General Public License version 3 (GPLv3)
If you decide to choose the GPLv3 license, you must comply with the following terms:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

## Pimcore Commercial License (PCL)
Alternatively, commercial and supported versions of the program - also known as
Commercial Distributions - must be used in accordance with the terms and conditions
contained in a separate written agreement between you and Pimcore GmbH.
For more information about the Pimcore Commercial License (PCL) please contact [email protected].



Please see also (files in this directory):
- [Licensing FAQ - license-faq.md](https://github.com/pimcore/pimcore/blob/master/license-faq.md)
- [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](gpl-3.0.txt)
27 changes: 27 additions & 0 deletions bundles/SystemInfoBundle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Pimcore System Info & Tools
System Info & Tools bundle provides additional tools for checking system information in Pimcore Admin UI.

## Tools:

### PHP Info
A simple interface that implement `phpinfo()` to provide PHP installation information.

You can check via Admin UI `Tools` / `System Info & Tools` / `PHP Info` menu.

### PHP OPcache Status
A clean interface based on [`amnuts/opcache-gui`](https://github.com/amnuts/opcache-gui) for
Zend OPcache information, showing statistics, settings and cached files, and providing a real-time update
for the cache information.

You can check via Admin UI `Tools` / `System Info & Tools` / `PHP OPcache Status` menu.

### System Requirements Check
A tool that gives you an overview of required and optional system requirements for running Pimcore Application.

You can check via Admin UI `Tools` / `System Info & Tools` / `System-Requirements Check` menu.

Or via following CLI command:

```bash
bin/console pimcore:system:requirements:check
```
21 changes: 21 additions & 0 deletions bundles/SystemInfoBundle/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Reporting a Vulnerability

If you think that you have found a security issue,
don’t use the bug tracker and don’t publish it publicly.
Instead, all security issues must be reported via 📫 to [[email protected]](mailto:[email protected]).


## Resolving Process
Every submitted security issue is handled with top priority by following these steps:

1. Confirm the vulnerability
2. Determine the severity
3. Contact reporter
4. Work on a patch
5. Get a CVE identification number (may be done by the reporter or a security service provider)
6. Patch reviewing
7. Tagging a new release for supported versions
8. Publish security announcement

28 changes: 28 additions & 0 deletions bundles/SystemInfoBundle/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "pimcore/system-info-bundle",
"license": "GPL-3.0+",
"type": "pimcore-bundle",
"description": "Pimcore System Info & Tools Bundle that provides additional tools for checking System information.",
"config": {
"sort-packages": true
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": "^8.1",
"pimcore/pimcore": "^11.0",
"amnuts/opcache-gui": "^3.0.1"
},
"autoload": {
"psr-4": {
"Pimcore\\Bundle\\SystemInfoBundle\\": "src/"
}
},
"extra": {
"pimcore": {
"bundles": [
"Pimcore\\Bundle\\SystemInfoBundle\\PimcoreSystemInfoBundle"
]
}
}
}
6 changes: 6 additions & 0 deletions bundles/SystemInfoBundle/config/pimcore/routing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_pimcore_bundle_system_info_backend:
resource: "../../src/Controller/"
type: annotation
prefix: /admin/bundle/system-info
options:
expose: true
16 changes: 16 additions & 0 deletions bundles/SystemInfoBundle/config/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

# auto-register all controllers as services
Pimcore\Bundle\SystemInfoBundle\Controller\:
resource: '../src/Controller'
public: true
tags: [ 'controller.service_arguments' ]

# auto-register all commands as services
Pimcore\Bundle\SystemInfoBundle\Command\:
resource: '../src/Command'
tags: [ 'console.command' ]
Loading

0 comments on commit a35ebca

Please sign in to comment.