GithubHelp home page GithubHelp logo

mteu / php-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 308 KB

A rather basic template for the Project Builder, a powerful Composer package to create new project packages from templates

License: GNU General Public License v3.0

Twig 87.51% PHP 12.49%
composer php template

php-template's Introduction

Project Builder Template

CGL Latest Stable Version License

๐Ÿ“ฆย Packagist ยท ๐Ÿ’พย Repository ยท ๐Ÿชฒย Issue tracker

This is a framework-agnostic Project Builder template with a relatively basic initial setup. It facilitates a swift and easy-to-use creation of Composer based PHP projects.

๐Ÿš€ Features

  • Static code analysis template with PHPStan
  • Automatic code migration with Rector
  • Pre-defined GitHub actions for CGL and releases

๐Ÿ”ฅ Getting started

  1. Create a new project:

    composer create-project cpsit/project-builder <target-directory>
  2. Project Builder will automatically fetch and list available templates on Packagist.org.

  3. Select the package mteu/php-template.

    image

  4. Follow the instructions and answer a few questions and you're good to go.

๐Ÿ’ก Please refer to the official Project Builder documentation to learn about alternative ways to create your project.

๐Ÿ‘ฉโ€๐Ÿ’ป:๐Ÿง‘โ€๐Ÿ’ป Contribution

We welcome your feedback and ideas! One quick ask, though: Please do consult CONTRIBUTING.md before proposing a PR. Thanks!

๐Ÿ’› Acknowledgement

This template is heavily based on the preparatory work done by @eliashaeussler and me in the TYPO3 Template Package.

โญ License

This project template is licensed under GNU General Public License 3.0 (or later).

php-template's People

Contributors

mteu avatar renovate[bot] avatar eliashaeussler avatar

Stargazers

 avatar

Watchers

Lucian avatar  avatar

Forkers

eliashaeussler

php-template's Issues

Offer license selection

Is your feature request related to a problem?

We are offering .. well forcing .. GPL 2.0 or later for historic reasons.

Describe the solution you'd like

Let users choose their license in the creation prompt.

Describe alternatives you've considered

No response

Additional context

No response

[!!!][FEATURE] Abandon package

This package is about do be abandoned for another way more useful package template by the Project Builder maintainer himself.

[BUG] Overriding the composer package name may result in an invalid `composer.json`

PHP version

any

Composer version

2.5.5

Package version

*-0.3.5

Project Builder version

2.2.2

Operating system

macOS

Current behavior

When following the interview process one is being asked to provide a vendor and project name. This information is used to suggest a Composer package name . This all well and swell. However, it's allowed to override the suggestion.

Project name: foo
Vendor name: bar
Composer package name [bar/foo]: baz

For the Composer package name any input (e.g. baz) is accepted even if it violates the expected JSON schema with the following pattern [0] resulting in an invalid composer.json after the generation.

[0] ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]|-{1,2})?[a-z0-9]+)*$.

Expected behavior

I would expect a validation on the input already.

Steps to reproduce

  1. Run the composer create-project command
  2. Answer the first two questions
  3. Specify an alternative answer to Composer package name that is missing a slash for instance:
Project name: foo
Vendor name: bar
Composer package name [bar/foo]: baz

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.