New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove app/autoload.php #1056

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
4 participants
@BPScott
Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

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

This comment has been minimized.

Contributor

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)

Remove app/autoload.php
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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

fabpot commented Apr 24, 2017

Thank you @BPScott.

@fabpot fabpot merged commit 298f8b2 into symfony:master Apr 24, 2017

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

feature #1056 Remove app/autoload.php (BPScott)
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

connordavison added a commit to connordavison/symfony-repl that referenced this pull request Nov 21, 2017

Add Symfony 3.3 support
`app/autoload.php` is removed from the Symfony standard edition in symfony/symfony-standard#1056, and `vendor/autoload.php` is used instead. This change should ensure that the correct autoloader is included in a backwards-compatible manner.

connordavison added a commit to connordavison/symfony-repl that referenced this pull request Nov 21, 2017

Add Symfony 3.3 support
`app/autoload.php` is removed from the Symfony standard edition in symfony/symfony-standard#1056, and `vendor/autoload.php` is used instead. This change should ensure that the correct autoloader is included in a backwards-compatible manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment