Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
minor #677 Fix some namespace issues in the tests directory (iamdto)
Browse files Browse the repository at this point in the history
This PR was merged into the 5.5.x-dev branch.

Discussion
----------

Fix some namespace issues in the tests directory

We noticed these warnings when running the following command in our projects:

```
$ composer install  --optimize-autoloader
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
Deprecation Notice: Class Sensio\Bundle\FrameworkExtraBundle\Tests\Request\ParamConverter\ArgumentNameConverterTest located in ./vendor/sensio/framework-extra-bundle/Tests/Request/ArgumentNameConverterTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/Cellar/composer/1.10.1/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddParamConverterPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddParamConverterPassTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/Cellar/composer/1.10.1/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\AddExpressionLanguageProvidersPassTest located in ./vendor/sensio/framework-extra-bundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/Cellar/composer/1.10.1/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
```

If you try to run the same command in this repository you will not be able to see them because of the following lines:

https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/d0585d4825a87a5030ca8cd34adb4a17e1066c17/composer.json#L46-L48

This PR should fix the warnings, however I'm wondering if that configuration in the `composer.json` file is necessary at all? Isn't it better to install with `--no-dev` if you want to exclude test classes from your autoloader? That configuration currently "hides" these warnings (if it'd have to happen again in the future).

Commits
-------

809f8d5 Fix some namespace issues in the tests directory
  • Loading branch information
fabpot committed Apr 16, 2020
2 parents d0585d4 + 809f8d5 commit efc3921
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection;
namespace Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\Compiler;

use Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection;
namespace Sensio\Bundle\FrameworkExtraBundle\Tests\DependencyInjection\Compiler;

use Sensio\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler\AddParamConverterPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down

0 comments on commit efc3921

Please sign in to comment.