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

Add a basic Makefile #45

Merged
merged 2 commits into from
Jan 26, 2024
Merged

Add a basic Makefile #45

merged 2 commits into from
Jan 26, 2024

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Jan 24, 2024

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.

@acelaya acelaya marked this pull request as draft January 24, 2024 10:40
@acelaya acelaya force-pushed the publish-workflow branch 2 times, most recently from bf43fc0 to 5e39d25 Compare January 25, 2024 11:09
Base automatically changed from publish-workflow to main January 25, 2024 11:18

.PHONY: lint
lint: vendor
composer lint
Copy link
Member

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?

Copy link
Contributor Author

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.
Copy link
Member

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?

Copy link
Contributor Author

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 😅

README.md Outdated Show resolved Hide resolved
@acelaya acelaya merged commit 7e2dd8b into main Jan 26, 2024
6 checks passed
@acelaya acelaya deleted the add-makefile branch January 26, 2024 13:03
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.

2 participants