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

PHP-PM master has now $debug and different interface #11

Open
marcj opened this issue Mar 17, 2016 · 3 comments
Open

PHP-PM master has now $debug and different interface #11

marcj opened this issue Mar 17, 2016 · 3 comments

Comments

@marcj
Copy link
Member

marcj commented Mar 17, 2016

See php-pm/php-pm-httpkernel@4de2a1a#diff-4e4aadfdc2edbd7dfe3479c6259178eaR42

Also Stack Builder has been removed since it was never in use.

Guess we should adjust this adapter as well.

Also the bridge interface has now a new method getStaticDirectory which should return the path to the folder with the static stuff.

@marcj marcj changed the title PHP-PM master has now $debug PHP-PM master has now $debug and different interface Mar 17, 2016
@marcj
Copy link
Member Author

marcj commented Mar 19, 2016

Downloaded some hours ago Drupal and got it working with our httpkernel adapter: php-pm/php-pm-httpkernel@aafd77f

All the stuff we have in php-pm-drupal's Bridge is not necessary, because its already in php-pm-httpkernel (make sense, as both use httpkernel).

The thing that doesn't work is css files for subpages (root page works). I'm not sure if php-pm-drupal did work with it, but I didn't get it working in general. Also login doesn't work as well. It seems drupal does not send cookies with HttpFoundation/Response, but I'm not sure yet. The response doesn't even contain cookies although with Symfony it works perfectly. I guess it's something with the configuration of drupal because the login redirects to the startpage and doesn't even seem to handle it because I don't get even an error message when I enter wrong credentials. So it's probably an issue with Drupals Request object (which again works in Symfony, which use HttpFoundation as well. should work on both equally good). However, I've seen so much mess in Drupals code, especially in DrupalKernel, it's actually a nightmare to dig deep into it and debug such stuff. Alone the css file name generation goes through so much methods, I can't even count it.

I've seen you have some patches. I needed one simple change as well (because again, I don't think they understood that Kernel::handle is a method that could be called more than one time. their architecture is not really made for it, although HttpKernel allows it per default). I've made a pull-request regarding this issue at drupal directly: drupal/drupal#57 - So if you want to test the drupal bootstrap I've pushed into httpkernel, you need to apply this patch in the pull request.

You can start in inside drupal via ppm start --bootstrap=drupal. That should be enough.

Please let me know what you think. If its necessary to make even more adjustments for drupal we should stick with this repo, but if it's only the simple class I've added we should let it be in httpkernel-adapter.

@kentr
Copy link
Collaborator

kentr commented Mar 19, 2016

Nice work. I saw that you had integrated the other stuff into HttpKernel, but haven't had a chance to look at it yet.

Also login doesn't work as well. It seems drupal does not send cookies with HttpFoundation/Response, but I'm not sure yet. The response doesn't even contain cookies although with Symfony it works perfectly.

I think Drupal was sending cookies for me under certain conditions. You may be experiencing #1 or #3.

The thing that doesn't work is css files for subpages

I think they were working for me on all pages. I may have a specific nginx config that got them working. I'll look into it when I can.

Please let me know what you think. If its necessary to make even more adjustments for drupal we should stick with this repo, but if it's only the simple class I've added we should let it be in httpkernel-adapter.

:-) With the problems encountered so far, I'm wondering if a full fork of Drupal will be required to make it work with PHP-PM... Especially #4, unless your changes in HttpKernel also solves that.

@kentr kentr mentioned this issue May 4, 2016
@andig
Copy link
Contributor

andig commented Nov 23, 2017

HttpKernel has meanwhile been upgraded to Psr7, so this adapter needs a full overhaul.

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

No branches or pull requests

3 participants