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

Conversation

@michalbundyra
Copy link
Member

@weierophinney please have a look on my improvements - development mode as class.
There are still few things I don't like...

Why I'd prefer this solution?

  • everything is encapsulated inside an object
  • removed duplications - only one response method returns error and success response depends on response code
  • removed static variables
  • it could be easier and cleaner parameterized
  • code looks more friendly - no procedural code

I don't like:

  • response method could be better
  • maybe it's not clear that calling response method stop further execution
  • calling on create object (maybe better static method DevelopmentMode::exec(...)?)
  • maybe we need to pass only $argv instead of both: $argc, $argv

Maybe all of it is matter of preferences. I'd like to fine the most friendly and modern solution. Finally this is gonna be used with ZF3! I think we can improve it a bit 😃

Thoughts?

weierophinney and others added 4 commits June 22, 2016 00:11
zend-development-mode has been a popular feature of Apigility, and a popular
standalone module. Unfortunately, its architecture uses the MVC <-> console
integration, which is problematic in the streamlined skeleton, which does not
include that out-of-the-box.

This patch creates development-mode as as standalone script in the project
`bin/` directory. Additionally, we add the `config/modules.config.php`, to push
modules into a separate file, and `config/development.config.php.dist`, to
provide a basic structure for segregated configuration. Finally, the bootstrap
is updated to test for the presence of `config/development.config.php` and merge
its contents with the application configuration.

Usage is:

```bash
$ ./bin/development-mode enable
```

Or, to disable:

```bash
$ ./bin/development-mode disable
```
@michalbundyra
Copy link
Member Author

Closed because of changes in #345

@michalbundyra michalbundyra deleted the feature/development-mode branch June 22, 2016 21:44
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.

2 participants