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

Added Magento 2 driver #47

Closed
wants to merge 1 commit into from
Closed

Added Magento 2 driver #47

wants to merge 1 commit into from

Conversation

sschlein
Copy link

@sschlein sschlein commented May 9, 2016

To test this driver, run the following commands. Please make sure to have an empty database "magento" which can be accessed with the root user without a password on localhost.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento

cd magento

chmod a+x bin/magento

bin/magento setup:install --base-url=http://magento.dev/ \
--db-host=localhost --db-name=magento --db-user=root --db-password= \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

@lazyguru
Copy link
Contributor

You should consider naming this Magento2ValetDriver instead (just for clarity that it only handles M2 installs).

@barryvdh
Copy link

+1 for renaming to Magento2 for clarity, as Magento1 is still supported until 2018.

I've tested this driver and it seems to work for the front-end + admin at least. I installed using Composer + CLI (http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-install.html), so not via /setup.

@barryvdh
Copy link

Also this has conflicts, so needs to be updated anyways :)

@LasseRafn
Copy link
Contributor

Cool! Any status on this?

@lazyguru
Copy link
Contributor

lazyguru commented Jul 7, 2016

For anyone still needing this, I've been using https://gist.github.com/lazyguru/686dd5673097b7db1483dc5c817bd4ee for the last few weeks for local dev with no issues. This PR's version seems geared at working with a site in production mode (hosted from pub directory). Mine runs from Magento root instead (for developer mode). If you diff my version from the SampleValetDriver.php you'll see it's not very different from it (mostly just removes reference to the "/public" path from URLs and then logic to detect the framework.)

@LasseRafn
Copy link
Contributor

Lovely! I'll give it a shot :-) I had to switch to Vagrant while waiting for this, so it's very much appreciated!

On 7 Jul 2016, at 23.53, Joe Constant notifications@github.com wrote:

For anyone still needing this, I've been using https://gist.github.com/lazyguru/686dd5673097b7db1483dc5c817bd4ee for the last few weeks for local dev with no issues. This PR's version seems geared at working with a site in production mode (hosted from pub directory). Mine runs from Magento root instead (for developer mode). If you diff my version from the SampleDriver.php you'll see it's not very different from it (mostly just removes reference to the "/public" path from URLs and then logic to detect the framework.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@lazyguru
Copy link
Contributor

lazyguru commented Aug 1, 2016

I updated my gist to be able to handle for either developer mode or production (treats default as if it is production). @sschlein if you want to update this PR with my code that is fine, otherwise I can submit a new PR with my version. https://gist.github.com/lazyguru/686dd5673097b7db1483dc5c817bd4ee

@lazyguru lazyguru mentioned this pull request Sep 15, 2016
@sschlein
Copy link
Author

A new by @lazyguru implementation is available

@sschlein sschlein closed this Dec 22, 2016
@beningreenjam
Copy link

beningreenjam commented Dec 31, 2016

Brand new install of Magento 2.1 and Valet 2 then added the Magento2 driver, which I have confirmed - via valet which - is being used.

Magento's static assets are all returning a 404 not found error.

@lazyguru
Copy link
Contributor

What do you have MAGE_MODE set to in app/etc/env.php? If it is set to anything other than developer you need to run the static content deploy using bin/magento

I am using this same driver with 2.1.3 and Valet 2 with no issues.

@lazyguru
Copy link
Contributor

Just realized which PR this is. Which driver are you talking about? Mine or @sschlein's?

@beningreenjam
Copy link

@lazyguru your driver. I've tried in all in 3 deployment modes but it's my understanding that the static content on production mode which is done automatically when switching to production mode.

@beningreenjam
Copy link

I'm also using Magento 2.1 and Valet 2.

@lazyguru
Copy link
Contributor

You might have to adjust some of the timeouts in nginx php-fpm. I proxy my requests using ngrok (or valet share). The first time it generates the symlinks can take a long time to process. Also, lets move to #147 since this pertains to my driver

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.

None yet

5 participants