Download the PHP package personare/plugin-boilerplate without Composer

On this page you can find all versions of the php package personare/plugin-boilerplate. 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 plugin-boilerplate

Plugin Boilerplate Release semantic-release

Plugin destinado a ser usado como boilerplate, ele irá ser usado principalmente quando surgir a necessidade de criar um plugin WordPress do zero, mas com uma estrutura já bem definida, pronto para testes unitários, linter + analisador estático de código e com container de injeção de dependência.

Requirements

Importante: Quando for fazer squash dos commits, será necessário alterar a mensagem do squash para o padrão Conventional Commit, caso isso não seja feito, o release não será gerado automaticamente.

Quickstart

  1. Entre em wp-content/plugins.
  2. Execute composer create-project personare/plugin-boilerplate nome-do-seu-novo-plugin.
  3. Renomeie as strings.
  4. Ative o seu novo plugin.

    Não esqueça de renomear

    Renomeie todas as strings abaixo para algo que faça sentido para o projeto que está a desenvolver.

    • MY_APP_
    • MyApp
    • my-app
    • plugin-boilerplate
    • GPL-2.0-only

      Scripts

    • composer ci irá executar todos os scripts importantes para o CI, consulte o composer.json caso queira roda-los individualmente;
    • yarn lint irá executar o linter para JavaScript + SASS;
    • yarn build comando para gerar os bundles;

      Configurando Phan como external tool no PHPStorm

    • Em Preferences -> Tools -> External Tools clique para adicionar uma nova tool. Coloque o nome que achar melhor, selecione run_phan.sh script como "Program" e selecione o diretório do projeto como "Working directory" e por ultimo coloque $FILE_PATH$:$LINE$ como "Output filters" clicando em "Advanced Options". Você consegue executar external tools em Tools -> External Tools.

Caso dê algum erro de permissão, execute chmod +x run_phan.sh no seu terminal.

Exemplo de uso

Consulte os arquivos dentro de src/WordPress/, lá vai encontrar bons exemplos de como declarar hooks nesta estrutura, caso queira registrar um CPT consulte src/WordPress/Services/ExampleServiceProvider.php ou se caso quer registrar uma Taxonomia, então consulte src/WordPress/Services/ExampleCategoryServiceProvider.php


All versions of plugin-boilerplate with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ^1.9
league/container Version ^3.3
php Version >=7.3
psr/log Version ^1.1
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 personare/plugin-boilerplate contains the following files

Loading the files please wait ....