Skip to content
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

Project Create Template : Simple suggestions #1181

Open
trentramseyer opened this issue Feb 7, 2018 · 1 comment
Open

Project Create Template : Simple suggestions #1181

trentramseyer opened this issue Feb 7, 2018 · 1 comment

Comments

@trentramseyer
Copy link

trentramseyer commented Feb 7, 2018

While creating a project from phalcon create project_name there are a couple steps I have to repeat to make it a base of what I use.

One, the index.php loads the router.php file before the $config=>$di->getConfig() command. This causes a problem because I like to create an array of endpoints in my config file that I loop through to create REST calls for them in the router file. It would be nice to have access to the config file variables.

Two, I create namespaces I am going to use in the config file, and if the config file and controllers had a basic Namespace it would be nice. I add the following line to the loader.php file to load them in easily. I believe Namespaces are a standard practice these days and is nice to have from the start.

$loader->registerNamespaces(
    (array) $config->namespaces
);

Three, I posted this in the forums at one point, but the minify command in the index.php file can corrupt javascript that is on the page within <script> tags. I don't find it very helpful at this time.

Just some suggestions,
Thanks for the framework!

Trent

@sergeysviridenko
Copy link
Contributor

@trentramseyer thank you for report.
We're in the process of rewrite devtools. Possibility to add custom configuration is envisaged. Creating project will be rewrite to.

@Jeckerson Jeckerson added this to the 4.0.0 milestone Mar 15, 2019
@Jeckerson Jeckerson modified the milestones: 4.0.0, 4.1.0 Nov 23, 2019
@Jeckerson Jeckerson modified the milestones: 4.0.x, 5.0.x Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants