Download the PHP package enpii/wp-proj without Composer
On this page you can find all versions of the php package enpii/wp-proj. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download enpii/wp-proj
More information about enpii/wp-proj
Files in enpii/wp-proj
Package wp-proj
Short Description The WordPress project setup for WordPress modern development with Laravel featuring EnpiiBase plugin
License MIT
Informations about the package wp-proj
Initialize
-
Create the project (stable version)
- Use development version (branch master)
in case you want to specify the branch (e.g. branch develop)
-
Ensure that you have the .env file, if it doesn't exists, you can copy from the example file
- Then use the appropriate env variables for you working environment, remember to check the SALTS section to use correct ones.
Development
- Install (or update) the dependencies
Deploy with Docker
The Docker file is built on top of serversideup/docker-php
https://github.com/serversideup/docker-php (which are ready for production according to Server Side Up team)
- Start all containers
then the website would be available at http://127.0.0.1:19180/ (the port 19180 can be edited in .env file)
- If WP_DEBUG set to 0 or 'off' or not set, the container wordpress would have xDebug working as we are in the debug mode
-
Update composer with Docker (disable xDebug should help the composer install/update faster)
- Run wp-cli (you must run with the user webuser to avoid running as root)
or check system info
or add Admin user
- Run wp-app artisan
or
Working with GIT
-
You can put your own plugins, themes, mu-plugins to corresponding folders. Then if you use git, you can add these things to your repository by:
- Update the
./wp-content/.gitignore
to allow your plugins, mu-plugins, themes -
e.g. you have a plugin called
hello-world
, you need to add this - Then you can
git add <your-plugin-folder>
to the repo
- Update the
Compiling assets (CSS, JS)
- This repo consists of a sample plugin Demoda and a sample theme Appeara Alpha, it has the webpack configs to compile plugin and theme CSS and JS. The assets would be compiled to
public-assets/dist
folders
To install dependencies
Compile plugin assets
or to watch and compile
Similarly to the theme with
and watch
Working with Translation
- Create the pot file for the Appeara Alpha theme
e.g.
Notes: if you are using Yarn < 1.0, you need to add --
before arguments like this
- Update the pot file to existing po files (same parent folder)
e.g.
- Create mo file (from po file), same parent folder
e.g.
Notes: Of course you can update the script (in package.json) to match your project.
Working with PHP Code Styling (PHPCS)
-
Check PHP code style of the project (using phpcs configuration file)
- Check PHP code style of a certain directory
e.g.
you should use the relative path
- Repair PHP code style
e.g.
Working with Unit Test
This project uses PHPUnit and configured Codeception Test framework. You should use PHPUnit to run the test because it supports isolationProcess which allow Mockery overload, alias to happen. You can run Codeception if you want.
Creating test files
- Add a new Unit Test file
e.g
or with Codeception
this command will create the file Demoda/Test/Test.php
to the path of codeception unit setting suites/tests/unit
. DO REMEMBER to use the setUp()
method instead of the _before()
to be able to run the test file with the PHPUnit as well.
Running Unit Test
-
Run Unit Test on a single file/folder with PHPUnit
- If you want to run Unit Test for a file/folder and only want the coverage report on a certain file/folder you can run with PHPUnit
e.g. (with extra --debug
option)
- Run Unit Test with PHPUnit (with coverage report to the folder
tests/_output/phpunit
)
or you just want to see the result in the console (not an HTML file)
Notes: You can use Codeception for Unit testing as the configuration is there but Codeception does not support isolationProcess, that means the test with Mokery overload would fail.
All versions of wp-proj with dependencies
mcaskill/composer-exclude-files Version ~4.0.0
johnpbloch/wordpress-core Version ^6.0
wp-plugins/woocommerce Version ^8.0
wp-theme/storefront Version ^4.0
wpackagist-theme/twentytwentyfour Version ^1.0.0
enpii/enpii-base Version dev-master
enpii/demoda Version *
enpii/appeara-alpha Version *
php Version ^8.0