-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add a basic Makefile #45
Conversation
31fb4f4
to
0b496f0
Compare
bf43fc0
to
5e39d25
Compare
|
||
.PHONY: lint | ||
lint: vendor | ||
composer lint |
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.
Is there any kind of PHP version management needed when installing dependencies, or is it like npm in our JS projects where we can get by without requiring a specific Node/npm version?
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.
The PHP version your project requires is defined as any other dependency, in the "require" block of the composer.json
file. This block is the equivalent to dependencies
in a package.json file, in the same way require-dev
is the same as devDependencies
.
https://github.com/hypothesis/wp-hypothesis/blob/main/composer.json#L11-L13
Unfortunately, it is only used to verify other dependencies you install will work with the PHP version you require, but it does not install the PHP binaries themeselves.
@@ -11,6 +11,13 @@ Stable versions are available on the [Hypothesis plugin page on WordPress.org](h | |||
5. Click Activate | |||
6. Visit your WordPress Settings > Hypothesis page to configure how it works on your site | |||
|
|||
## Development | |||
|
|||
1. Install `php` and the `dom` and `mbstring` extensions. |
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.
Is there a reference page we could link to for how to install these extensions? Are they typically included by default in the main PHP releases?
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.
This typically depends on the system. In Mac most of the people uses brew to install PHP and PHP extensions.
In Linux distros you can use the system package manager, but if you want the latest PHP versions you frequently have to add custom repositories.
In Windows, I have no idea 😅
Part of #40
Add a very basic
Makefile
, which follows the usual tasks we have in other projects.The only exception are tasks around testing, as there are no tests yet. We can add tasks related with tests as part of adding the tests themselves.