Skip to content

Commit 5e068bd

Browse files
authored
Merge pull request #550 from outlandishideas/develop
updating php dependencies
2 parents 022a77e + 31e0c77 commit 5e068bd

4 files changed

Lines changed: 533 additions & 380 deletions

File tree

README.md

Lines changed: 131 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,131 @@
1-
WordPress Packagist
2-
===
3-
4-
This is the repository for [wpackagist.org](https://wpackagist.org) which allows WordPress plugins and themes to be
5-
managed along with other dependencies using [Composer](https://getcomposer.org).
6-
7-
More info and usage instructions at [wpackagist.org](https://wpackagist.org) or follow us on
8-
Twitter [@wpackagist](https://twitter.com/wpackagist).
9-
10-
For support and discussion, please use the issue tracker above.
11-
12-
## Usage
13-
14-
Example composer.json:
15-
16-
```json
17-
{
18-
"name": "acme/brilliant-wordpress-site",
19-
"description": "My brilliant WordPress site",
20-
"repositories":[
21-
{
22-
"type":"composer",
23-
"url":"https://wpackagist.org",
24-
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
25-
}
26-
],
27-
"require": {
28-
"aws/aws-sdk-php":"*",
29-
"wpackagist-plugin/akismet":"dev-trunk",
30-
"wpackagist-plugin/wordpress-seo":">=7.0.2",
31-
"wpackagist-theme/hueman":"*"
32-
},
33-
"autoload": {
34-
"psr-0": {
35-
"Acme": "src/"
36-
}
37-
}
38-
}
39-
```
40-
41-
## WordPress core
42-
43-
This does not provide WordPress itself.
44-
45-
See https://github.com/fancyguy/webroot-installer or https://github.com/roots/wordpress.
46-
47-
## How it works
48-
49-
WPackagist implements the `wordpress-plugin` and `wordpress-theme` Composer Installers
50-
(https://github.com/composer/installers).
51-
52-
It essentially provides a lookup table from package (theme or plugin) name to WordPress.org
53-
SVN repository. Versions correspond to different tags in their repository, with the special
54-
`dev-trunk` version being mapped to `trunk`.
55-
56-
Note that to maintain Composer v1 compatibility (as well as v2)
57-
for `dev-` versions, for now we need to use the `VersionParser` from
58-
`composer/composer` v1.x and not a newer release branch. Correct resolution
59-
of these depends on the legacy behaviour where `dev-trunk` et al. correspond to
60-
61-
"version_normalized":"9999999-dev"
62-
63-
The lookup table is provided as a hierarchy of static JSON files. The entry point to these
64-
files can be found at https://wpackagist.org/packages.json, which consists of a series of
65-
sub-tables (each as its own JSON file). These sub-tables are grouped by last commit
66-
date (trying to keep them roughly the same size), and contain references to individual packages.
67-
Each package has its own JSON file detailing its versions; these can be found in
68-
https://wpackagist.org/p/wpackagist-{theme|plugin}/{package-name-and-hash}.json.
69-
70-
### Version format limitations
71-
72-
Currently, Wpackagist can only process packages with up to 4 parts in their version numbers, in line with
73-
the internal handling of Composer v1.x.
74-
75-
## Running Wpackagist
76-
77-
### Installing
78-
79-
1. Make sure you have Composer dependencies installed, including extensions.
80-
2. Make `.env.local`, overriding anything you want to from `.env`.
81-
3. (Only if you're going to skip using a database for `PackageStore`): ensure sure your `PACKAGE_PATH` directory is writable.
82-
4. Run `composer install` to install dependencies.
83-
5. Populate the database and package files (see steps below).
84-
5. Point your Web server to [`web`](web/). A [`.htaccess`](web/.htaccess) is provided for Apache.
85-
86-
### Updating the database
87-
88-
The first database population may easily take hours. Be patient.
89-
90-
0. `bin/console doctrine:migrations:migrate`: Ensure the database schema is up to date with the code.
91-
1. `bin/console refresh`: Query the WordPress.org SVN in order to find new and updated packages.
92-
2. `bin/console update`: Update the version information for packages identified in `2`. Uses the WordPress.org API.
93-
3. `bin/console build`: Rebuild all `PackageStore` data.
94-
95-
## Running locally with Docker
96-
97-
This may be simpler than setting up native dependencies, but is
98-
experimental.
99-
100-
To prepare environment variables:
101-
102-
cp .env .env.local
103-
104-
and edit as necessary.
105-
106-
To set up and update the database:
107-
108-
docker-compose run --rm cron composer install
109-
docker-compose run --rm cron deploy/migrate-db.sh
110-
docker-compose run --rm cron
111-
112-
To start a web server on `localhost:30100`:
113-
114-
docker-compose up web adminer
115-
116-
#### Services
117-
118-
* Web: [localhost:30100](http://localhost:30100)
119-
* Adminer: [localhost:30101](http://localhost:30101) (See credentials in `.env.postgres.local`)
120-
121-
## Live deployments
122-
123-
CircleCI is used to deploy the live app on ECS.
124-
125-
Automatic deploys run:
126-
127-
* from `develop` to [Staging](https://staging-wpackagist.out.re);
128-
* from `main` to [Production](https://wpackagist.org/)
129-
130-
See [.circleci/config.yml](./.circleci/config.yml) for full configuration.
1+
WPackagist
2+
===
3+
4+
This is the repository for [wpackagist.org](https://wpackagist.org) which allows WordPress® plugins and themes to be
5+
managed along with other dependencies using [Composer](https://getcomposer.org).
6+
7+
More info and usage instructions at [wpackagist.org](https://wpackagist.org) or follow us on
8+
Twitter [@wpackagist](https://twitter.com/wpackagist).
9+
10+
For support and discussion, please use the issue tracker above.
11+
12+
## Usage
13+
14+
Example composer.json:
15+
16+
```json
17+
{
18+
"name": "acme/brilliant-wordpress-site",
19+
"description": "My brilliant WordPress site",
20+
"repositories":[
21+
{
22+
"name": "wpackagist",
23+
"type": "composer",
24+
"url": "https://wpackagist.org",
25+
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
26+
}
27+
],
28+
"require": {
29+
"aws/aws-sdk-php":"*",
30+
"wpackagist-plugin/akismet":"dev-trunk",
31+
"wpackagist-plugin/wordpress-seo":">=7.0.2",
32+
"wpackagist-theme/hueman":"*"
33+
},
34+
"autoload": {
35+
"psr-0": {
36+
"Acme": "src/"
37+
}
38+
}
39+
}
40+
```
41+
42+
## WordPress® core
43+
44+
This does not provide WordPress® itself.
45+
46+
See https://github.com/fancyguy/webroot-installer or https://github.com/roots/wordpress.
47+
48+
## How it works
49+
50+
WPackagist implements the `wordpress-plugin` and `wordpress-theme` Composer Installers
51+
(https://github.com/composer/installers).
52+
53+
It essentially provides a lookup table from package (theme or plugin) name to wordpress.org
54+
SVN repository. Versions correspond to different tags in their repository, with the special
55+
`dev-trunk` version being mapped to `trunk`.
56+
57+
Note that to maintain Composer v1 compatibility (as well as v2)
58+
for `dev-` versions, for now we need to use the `VersionParser` from
59+
`composer/composer` v1.x and not a newer release branch. Correct resolution
60+
of these depends on the legacy behaviour where `dev-trunk` et al. correspond to
61+
62+
"version_normalized":"9999999-dev"
63+
64+
The lookup table is provided as a hierarchy of static JSON files. The entry point to these
65+
files can be found at https://wpackagist.org/packages.json, which consists of a series of
66+
sub-tables (each as its own JSON file). These sub-tables are grouped by last commit
67+
date (trying to keep them roughly the same size), and contain references to individual packages.
68+
Each package has its own JSON file detailing its versions; these can be found in
69+
https://wpackagist.org/p/wpackagist-{theme|plugin}/{package-name-and-hash}.json.
70+
71+
### Version format limitations
72+
73+
Currently, Wpackagist can only process packages with up to 4 parts in their version numbers, in line with
74+
the internal handling of Composer v1.x.
75+
76+
## Running Wpackagist
77+
78+
### Installing
79+
80+
1. Make sure you have Composer dependencies installed, including extensions.
81+
2. Make `.env.local`, overriding anything you want to from `.env`.
82+
3. (Only if you're going to skip using a database for `PackageStore`): ensure sure your `PACKAGE_PATH` directory is writable.
83+
4. Run `composer install` to install dependencies.
84+
5. Populate the database and package files (see steps below).
85+
5. Point your Web server to [`web`](web/). A [`.htaccess`](web/.htaccess) is provided for Apache.
86+
87+
### Updating the database
88+
89+
The first database population may easily take hours. Be patient.
90+
91+
0. `bin/console doctrine:migrations:migrate`: Ensure the database schema is up to date with the code.
92+
1. `bin/console refresh`: Query the wordpress.org SVN in order to find new and updated packages.
93+
2. `bin/console update`: Update the version information for packages identified in `2`. Uses the wordpress.org API.
94+
3. `bin/console build`: Rebuild all `PackageStore` data.
95+
96+
## Running locally with Docker
97+
98+
This may be simpler than setting up native dependencies, but is
99+
experimental.
100+
101+
To prepare environment variables:
102+
103+
cp .env .env.local
104+
105+
and edit as necessary.
106+
107+
To set up and update the database:
108+
109+
docker-compose run --rm cron composer install
110+
docker-compose run --rm cron deploy/migrate-db.sh
111+
docker-compose run --rm cron
112+
113+
To start a web server on `localhost:30100`:
114+
115+
docker-compose up web adminer
116+
117+
#### Services
118+
119+
* Web: [localhost:30100](http://localhost:30100)
120+
* Adminer: [localhost:30101](http://localhost:30101) (See credentials in `.env.postgres.local`)
121+
122+
## Live deployments
123+
124+
CircleCI is used to deploy the live app on ECS.
125+
126+
Automatic deploys run:
127+
128+
* from `develop` to [Staging](https://staging-wpackagist.out.re);
129+
* from `main` to [Production](https://wpackagist.org/)
130+
131+
See [.circleci/config.yml](./.circleci/config.yml) for full configuration.

0 commit comments

Comments
 (0)