Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Feature/class map generator command [#2407, #2471] #3394

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

Closed

Conversation

cordoval
Copy link
Contributor

Adds a command for Map Class Generator

#2407

quote @lsmith77 :

"it appears we do not have tools to generate a class map to be used in the map class loader. maybe we should even provide a command. then again maybe this should be handled by https://github.com/sensio/SensioDistributionBundle/tree/master/Resources/bin ?"

@stof
Copy link
Member

stof commented Feb 18, 2012

@stof stof closed this Feb 18, 2012
@stof stof reopened this Feb 18, 2012
@lsmith77
Copy link
Contributor

this is a Symfony2 CLI command that uses the ClassMapGenerator

@stof
Copy link
Member

stof commented Feb 18, 2012

Ah sorry, this is the command. Looked at it too fast

@lstrojny
Copy link
Contributor

Do I understand it correctly that this one allows generating autoloader classmaps for various third-party deps without proper autoloaders?

@lsmith77
Copy link
Contributor

yes .. thats the idea

@lstrojny
Copy link
Contributor

Very cool!

@cordoval
Copy link
Contributor Author

@lsmith77 I wonder if we can work more methods on the ClassMapper class in order to include also files that do not contain classes but functions, I have seen that occurring on say zetacomponents. If this generator not only generates a class map but a class map and the set_include_path to include these functions files that would rock? @stof?

@stof
Copy link
Member

stof commented Feb 18, 2012

@cordoval functions are not autoloadable. So this would be totally useless: you have to require the file before using the function, you cannot ask an autoloader to do the job. And set_include_path would not make functions autoloadable.

@lsmith77
Copy link
Contributor

I don't think @cordoval was implying that they would be autoloadable .. just that it could collect all files that contain functions and put requires for these files into a single file, to make it easier to manually load all functions of a lib.

@stof
Copy link
Member

stof commented Feb 18, 2012

the class map generator is not about putting files together but about creating a class map for the autoloader

@fabpot
Copy link
Member

fabpot commented Mar 7, 2012

I don't think that such a command is really useful as you probably want files from more than one directory (and probably exclude some files from these directories). I think it would be much better to write a cookbook in the documentation explaining how to take advantage of the new map generator instead (see symfony/symfony-docs#1134).

@fabpot fabpot closed this Mar 7, 2012
@cordoval
Copy link
Contributor Author

cordoval commented Mar 7, 2012

it could be a micro command, as this can be fed with a specific folder so to group things, then the cookbook

@cordoval
Copy link
Contributor Author

cordoval commented Mar 7, 2012

I volunteer for the cookbook though i don't have a super realistic case yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants