Light reformat code
Is your feature request related to a problem? Please describe.
- Old PHP code
src/aliases.phpnot compatible with PSRsrc/Task/Composer.phpcan't be loaded in production
Describe the solution you'd like
- Update outdated code to 5.6+, for example, replace
array(...)to[...]by CodeSniffer - Move up & update
aliases.php(#2173) and update related files:
- remove wrong https://github.com/googleapis/google-api-php-client/blob/1530583a711f4414407112c4068464bcbace1c71/composer.json#L40
phpcs.xml.dist(remove https://github.com/googleapis/google-api-php-client/blob/1530583a711f4414407112c4068464bcbace1c71/phpcs.xml.dist#L87- and etc.
composer.json:
"autoload": {
"psr-4": {"Google\\": "src/"},
"files": ["aliases.php"],
"exclude-from-classmap": ["src/Task/Composer.php"]
},
"autoload-dev": {
"psr-4": {"Google\\Tests\\": "tests/Google/"},
"files": ["src/Task/Composer.php", "tests/BaseTest.php"],
"exclude-from-classmap": ["tests/clearToken.php,", "tests/bootstrap.php"]
},
Hi @WinterSilence ! Thanks for filing this issue.
I am a little confused about what your ask is (there are quite a few changes being proposed here). Is the request here mostly to ensure that src/Task/Composer.php is excluded from autoloading in production for security reasons? I'm also not sure why the autoload-dev section needs to be there for. We don't need any of those autoloaded, since that happens in bootstrap.php already.
I'm also not sure why we should remove PSR2.Classes.ClassDeclaration.
Maybe you'd be better off submitting a PR and we can review/comment these items individually?
Thanks!