Download the PHP package vonaffenfels/wp-plugin-skeleton without Composer

On this page you can find all versions of the php package vonaffenfels/wp-plugin-skeleton. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-plugin-skeleton

wp-plugin-skeleton

Skeleton for development of Wordpress plugins using the vAF Wordpress Framework

Create a new plugin

To create a new plugin simply run composer create-project vonaffenfels/wp-plugin-skeleton <new-plugin-slug>.

Composer will install all required dependencies for you, ask you some questions about your new plugin and will modifiy/create all necessary files for you.

Vendor prefixing

To counter the dependancy conflict problem when using Wordpress plugins that have composer dependencies, we decided to use a technic called "Vendor Prefixing".

Here we create a new namespace where all dependencies can live in.

Take a look at the file src/Plugin.php so see how it works.

While developing, you MUST NOT use the dependency inside the vendor directory but instead use the dependency inside the vendor_prefixed directory. IDEs will normally show you the namespace the required class is in. Make sure, that it is prefixed with the namespace you selected when creating the new plugin.

Best way to make sure you only used the dependencies inside the vendor_prefixed directory, is to run the command composer install --no-dev after every install. That way all packages will get removed and will not be found by any IDE.

When you install a new package you MUST require it as a development dependency by running composer require --dev <package>.

If you need a development dependency that should not be included in the final plugin package, simply add a new line to the file scoper.inc.php where you mark that packages as ignored. It will then not be prefixed.

Packaging/Deployment

You MUST always commit the cached dependency injection container (which can be found in directory container).

To build the container before committing/packaging, simply run composer build-container. The container will then be updated to the current state.

If you want to deploy your plugin using composer (like in a Bedrock Wordpress environment) you don't have to do anything special.

If you want to deploy your plugin as ZIP file to use in standard Wordpress installations, run the command composer install --no-dev to remove all packages from vendor directory. Then you can ZIP the complete plugin. And don't forget to include the vendor directory. It contains the necessary autoloader files.

Container building

To rebuild the dependency injection container, simply run composer build-container.


All versions of wp-plugin-skeleton with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vonaffenfels/wp-plugin-skeleton contains the following files

Loading the files please wait ....