Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Use proper autoloading for the kernel rather than file inclusion #897

Merged
merged 1 commit into from
Dec 2, 2015

Conversation

stof
Copy link
Member

@stof stof commented Dec 1, 2015

This allows to register the autoloading for AppCache too, making the diff smaller when wanting to use it.

This allows to register the autoloading for AppCache too, making the
diff smaller when wanting to use it.
@Pierstoval
Copy link
Contributor

Very 👍

@stof
Copy link
Member Author

stof commented Dec 1, 2015

sorry to have missed it before the release. I noticed files was used instead of classmap while looking at the KnpUniversity screencast about upgrading a project.

@Tobion
Copy link
Contributor

Tobion commented Dec 1, 2015

👍

1 similar comment
@xabbuh
Copy link
Member

xabbuh commented Dec 1, 2015

👍

@weaverryan
Copy link
Member

Makes sense to me. @stof is this just a "nice" thing, or are there some real consequences related to autoloading (related to your conversation on symfony/symfony-installer#213)?

@stof
Copy link
Member Author

stof commented Dec 2, 2015

There is a consequence: the AppKernel class is not loaded as soon as you load the composer ClassLoader, but only on first usage, allowing to keep its parent classes in the bootstrap.php.cache file as done previously.

the nice side-effect is also making it simpler to use AppCache as it is now autoloaded

@Tobion
Copy link
Contributor

Tobion commented Dec 2, 2015

Thank you @stof.

@Tobion Tobion merged commit 2c45777 into symfony:2.8 Dec 2, 2015
Tobion added a commit that referenced this pull request Dec 2, 2015
…nclusion (stof)

This PR was merged into the 2.8 branch.

Discussion
----------

Use proper autoloading for the kernel rather than file inclusion

This allows to register the autoloading for AppCache too, making the diff smaller when wanting to use it.

Commits
-------

2c45777 Use proper autoloading for the kernel rather than file inclusion
@ghost
Copy link

ghost commented Dec 11, 2015

This fix is not included if I create a new project with the symfony installer tool.

# Linux, Mac OS X
$ symfony new test

# Windows
c:\> php symfony new test

I think a lot of people (for example beginners) will not know this issue.

@stof stof deleted the better_kernel_autoloading branch December 11, 2015 13:49
@stof
Copy link
Member Author

stof commented Dec 11, 2015

@JHGitty this is expected, as this has been merged after the 2.8 release, and so will be available in the 2.8.1 archives

@xabbuh
Copy link
Member

xabbuh commented Dec 11, 2015

It it isn't too much work it would nonetheless be good to rebuild the archives with the current SE to reduce bad experiences for anyone starting new projects based on 2.8.0 or 3.0.0 in the meantime.

@jvasseur
Copy link

@xabbuh that would need recreating the tags which is probably a bad idea.

@javiereguiluz
Copy link
Member

Besides, even for small changes, recreating the published packages is scary because unexpected things could break.

@ghost
Copy link

ghost commented Dec 11, 2015

That because I hope there will be a new release (2.8.1, 3.0.1, ..) as soon as possible 👍

@Pierstoval
Copy link
Contributor

As I asked on twitter, a new patch version is released approximately every month, so we can expect 2.8.1 to be released in less than 20 days 👍 😉

bocharsky-bw added a commit to bocharsky-bw/symfony-standard that referenced this pull request Dec 14, 2015
bocharsky-bw added a commit to bocharsky-bw/symfony-standard that referenced this pull request Dec 14, 2015
Tobion added a commit that referenced this pull request Dec 15, 2015
…sky-bw)

This PR was merged into the 2.8 branch.

Discussion
----------

Add notice about autoloading AppCache via Composer

According to #897 .

Commits
-------

a5d635c Add notice about autoloading AppCache via Composer
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants