Skip to content

Quick fix for SHTB (self-hosting test bundle) server run regression #21

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

Merged
merged 2 commits into from
Aug 21, 2013

Conversation

dantleech
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? N/A
Fixed tickets N/A
License MIT
Doc PR N/A

Since the environment refactorings the server command doesn't work, this is a very quick fix. The code needs to be refactored/looked-at again. //cc @wouterj

One problem is how to choose the test environent when accessing the test server locally @ http://localhost:8000

We do need tests for the Testing bundle, although I'm not sure how this could have been tested.

@lsmith77
Copy link
Member

how is this feature used?

require_once __DIR__.'/../../bootstrap/bootstrap.php';

// fixme: hack!!
$env = 'phpcr';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i get it now .. not sure i understand the places you marked as hack. if i get things right .. then these hacks only affect the server command? i guess it would be ideal if the env would be determined when calling the server command .. which you seem to be handling, so i am not sure why this hack here is also necessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server command only uses the application to launch the server. This front controller serves the request

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess what is needed is to persist the env parameter pased to the server command so that it can be used when serving requests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe - or we can always launch the front controller with a specific environment, see my other comment below. I wonder if we even need Symfony for the server script.

@lsmith77
Copy link
Member

i tweaked it so that the env can be overwritten via a query parameter:
http://localhost:8000/admin/cmf/simplecms/page/create?env=orm

lsmith77 added a commit that referenced this pull request Aug 21, 2013
Quick fix for SHTB (self-hosting test bundle)  server run regression
@lsmith77 lsmith77 merged commit 5b2922c into master Aug 21, 2013
@lsmith77 lsmith77 deleted the fix_server_run_regression branch August 21, 2013 20:14
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.

3 participants