forked from jspellman814/wordpress-composer-managed
-
Notifications
You must be signed in to change notification settings - Fork 1
first steps toward getting started #90
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Advanced setup for Composer | ||
|
||
In this tutorial, you will go beyond the basic Composer setup to include the | ||
full set of WordPress coding standards. | ||
|
||
## Prerequisites | ||
|
||
You should already have completed the [Getting Started](getting-started.md) tutorial. | ||
|
||
## PHP CodeSniffer | ||
|
||
The only global package currently needed is PHP CodeSniffer, and the WordPress | ||
coding standards: | ||
|
||
```bash | ||
$ composer global require squizlabs/php_codesniffer | ||
``` | ||
|
||
At this point you should be able to see something like the following output: | ||
|
||
```bash | ||
$ phpcs -i | ||
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend | ||
``` | ||
|
||
## WordPress coding standards | ||
|
||
Installing the WordPress code standards should be a process like: | ||
|
||
```bash | ||
$ git clone --branch master git@github.com:WordPress/WordPress-Coding-Standards.git ~/code/wpcs | ||
$ phpcs --config-set installed_paths ~/code/wpcs | ||
``` | ||
|
||
You have done everything correctly if you see the following output: | ||
|
||
```bash | ||
$ phpcs -i | ||
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs and WordPress-Extra | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Getting started | ||
|
||
In this tutorial, you will set up a local version of our WordPress network. | ||
|
||
## Prerequisites | ||
|
||
Please ensure you have the following tools set up on your computer. Everything | ||
can be installed via [Homebrew](https://brew.sh/). | ||
|
||
### PHP | ||
|
||
We currently use the latest release on the 8.0.x branch, using commands such as: | ||
|
||
```bash | ||
$ brew install php@8.0 | ||
``` | ||
|
||
### Composer | ||
|
||
https://getcomposer.org/ | ||
|
||
```bash | ||
$ brew install composer | ||
``` | ||
|
||
### Terminus CLI | ||
|
||
https://docs.pantheon.io/terminus | ||
|
||
There are a few packages with this name - you're looking for this one: | ||
|
||
```bash | ||
$ brew install pantheon-systems/external/terminus | ||
``` | ||
|
||
Authenticating via Terminus is documented at https://docs.pantheon.io/terminus/install#authenticate | ||
|
||
Additionally, there are four plugins you'll need: | ||
|
||
- [terminus-build-tools-plugin](https://github.com/pantheon-systems/terminus-build-tools-plugin) | ||
- [terminus-composer-plugin](https://github.com/pantheon-systems/terminus-composer-plugin) | ||
- [terminus-secrets-manager-plugin](https://github.com/pantheon-systems/terminus-secrets-manager-plugin) | ||
- [terminus-secrets-plugin](https://github.com/pantheon-systems/terminus-secrets-plugin) | ||
|
||
The syntax to install each is typically: | ||
|
||
```bash | ||
terminus self:plugin:install plugin-name | ||
``` | ||
|
||
You have done everything correctly when: | ||
|
||
- You see your information with `terminus auth:whoami` | ||
- You see four plugins listed by `terminus self:plugin:list` | ||
- You see at least three entries with `terminus env:list mitlib-wp-network` | ||
|
||
### Lando | ||
|
||
https://lando.dev/ | ||
|
||
```bash | ||
$ brew install --cask lando | ||
``` | ||
|
||
## Set up application | ||
|
||
- git clone mitlib-wp-network | ||
- composer install | ||
- lando pull | ||
- lando wp search-replace command | ||
- lando start | ||
- (optional) lando logs -f | ||
|
||
Get .env from someone | ||
|
||
Set secrets.json values inside Lando (need more words here) | ||
|
||
Load https://mitlib-wp-network.lndo.site/ and see the homepage |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh... oops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully that bodes well for when we get around to upgrading PHP versions :-)