Skip to content
This repository has been archived by the owner. It is now read-only.

Remove app/autoload.php #1056

Merged
merged 1 commit into from Apr 24, 2017
Merged

Remove app/autoload.php #1056

merged 1 commit into from Apr 24, 2017

Conversation

@BPScott
Copy link
Contributor

@BPScott BPScott commented Mar 16, 2017

Now that symfony/symfony#21837 is merged, app/autoload.php can be removed and replaced with the standard Composer autoloader.

WAIT! This can't be merged just yet, as it throws errors when running the buildBootstrap post install/update script. The fix for this is in sensiolabs/SensioDistributionBundle#313. That PR must be merged and this PR must be updated to use a version of SensioDistributionBundle that contains the fix before this is good to go.

EDIT: sensiolabs/SensioDistributionBundle#313 is merged (as of 24/04), and this PR has been updated to use the latest version of SensioDistributionBundle. This is now good to merge

@Pierstoval
Copy link
Contributor

@Pierstoval Pierstoval commented Mar 16, 2017

I'm 👍 with these changes, but why don't we also recommend a custom PHPUnit bootstrap file? On every project on which I have to write PHPUnit tests, I have to create a custom booststrap file to reset the database or to change some stuff before testing.

What do you think?

@BPScott
Copy link
Contributor Author

@BPScott BPScott commented Mar 16, 2017

I'm a newcomer so may be misinterpreting but everything I've saw recently seemed to have been about moving Symfony towards a more minimal, lean structure by default while allowing expansion if required (see slight glimpses of Flex and the reimagining of symfony-standard. Adding a file whose sole contents will be something like <?php require_once '../vendor/autoload.php'; seems like the sort of overhead Symfony is now seeking to avoid.

Anecdotally I haven't needed to create a PHPUnit bootstrap for any of the Symfony projects I've worked on recently - LiipFunctionalTestBundle has taken care of all my DB resetting needs.

@flug
Copy link

@flug flug commented Mar 17, 2017

If I'm not mistaken 'app/autoload.php' is used to load classes or file functions no composerify for the project
http://symfony.com/doc/current/components/class_loader/class_loader.html

@Pierstoval
Copy link
Contributor

@Pierstoval Pierstoval commented Mar 17, 2017

@flug The goal of this PR is just to remove Symfony Standard's autoload file that becomes useless thanks to symfony/symfony#21837, not to get rid of the ClassLoader component (which will be removed in Symfony 4.0 only)

Now that symfony/symfony#21837 and
sensiolabs/SensioDistributionBundle#313 are merged, app/autoload.php can be
removed and replaced with the standard Composer autoloader.
@BPScott
Copy link
Contributor Author

@BPScott BPScott commented Apr 24, 2017

sensiolabs/SensioDistributionBundle#313 is merged, and this PR has been updated to use the latest version of SensioDistributionBundle. This is now good to go.

The fabbot check failure is unrelated to this change.

@fabpot
Copy link
Member

@fabpot fabpot commented Apr 24, 2017

Thank you @BPScott.

@fabpot fabpot merged commit 298f8b2 into symfony:master Apr 24, 2017
1 check failed
1 check failed
fabbot.io Some changes should be done to comply with our standards.
Details
fabpot added a commit that referenced this pull request Apr 24, 2017
This PR was merged into the 3.3-dev branch.

Discussion
----------

Remove app/autoload.php

Now that symfony/symfony#21837 is merged, app/autoload.php can be removed and replaced with the standard Composer autoloader.

~WAIT! This can't be merged *just* yet, as it throws errors when running the `buildBootstrap` post install/update script. The fix for this is in sensiolabs/SensioDistributionBundle#313. That PR must be merged and this PR must be updated to use a version of SensioDistributionBundle that contains the fix before this is good to go.~

EDIT: sensiolabs/SensioDistributionBundle#313 is merged (as of 24/04), and this PR has been updated to use the latest version of SensioDistributionBundle. This is now good to merge

Commits
-------

298f8b2 Remove app/autoload.php
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants