Download the PHP package mael/symfony-api-template without Composer

On this page you can find all versions of the php package mael/symfony-api-template. 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 symfony-api-template

Symfony API Template

Table of content

Getting Started

Requirements :

First create a new project with composer

In the composer.json file, change the name of the project by yours as well as the description and the license.

Configuration

Before you can start your project, you need to do some basic configuration

Doctrine

In the .env file, modify the DATABASE_URL by filling in your identifiers (see the Symfony documentation)

Unit tests

Our template provides you with a lot of tools for unit testing, you'll have to configure some things to suit your project

First, in the files WebTestCase.php and ApiTestCase.php you need to modify the login information that will be used to log in to a user.

You need to fill in the following variables $username, $password and $route

Ex :

PHPStan

We also added PHPStan which allows you to detect errors in your code, you can change the level of detection in the phpstan.neon file.

You will find PHPStan's documentation via this link https://phpstan.org/

JWT Configuration

We assume that your api will use the LexikJWTAuthenticationBundle. You will find the configuration in config/packages

First, in the .env file, modify JWT_PASSPHRASE by a string that you will choose

When you do the following two commands, it will ask you to enter the passphrase you previously selected

For JWT authentication to work, you need to generate two :

We have also added a bundle to refresh the JWT token, you will find the documentation here https://github.com/markitosgv/JWTRefreshTokenBundle#readme

You can also configure the route in the config/route.yaml file.

Be careful, you have to configure the authentication system yourself via JWT, in the security.yaml file (see the bundle documentation https://github.com/lexik/LexikJWTAuthenticationBundle/blob/master/Resources/doc/index.md).

First Functional test

During your first functional tests you will have to generate the sqlite database using the command

Contributing

If you want to contribute to the improvement of the template, you can :

License

This repository is under MIT License


All versions of symfony-api-template with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
ext-ctype Version *
ext-iconv Version *
ext-json Version *
api-platform/api-pack Version ^1.2
gesdinet/jwt-refresh-token-bundle Version ^0.9.1
lexik/jwt-authentication-bundle Version ^2.8
sensio/framework-extra-bundle Version ^5.1
symfony/asset Version 5.1.*
symfony/console Version 5.1.*
symfony/dotenv Version 5.1.*
symfony/expression-language Version 5.1.*
symfony/flex Version ^1.3.1
symfony/form Version 5.1.*
symfony/framework-bundle Version 5.1.*
symfony/http-client Version 5.1.*
symfony/intl Version 5.1.*
symfony/mailer Version 5.1.*
symfony/mime Version 5.1.*
symfony/monolog-bundle Version ^3.1
symfony/notifier Version 5.1.*
symfony/orm-pack Version *
symfony/process Version 5.1.*
symfony/security-bundle Version 5.1.*
symfony/serializer-pack Version *
symfony/string Version 5.1.*
symfony/translation Version 5.1.*
symfony/twig-pack Version *
symfony/validator Version 5.1.*
symfony/web-link Version 5.1.*
symfony/yaml Version 5.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 mael/symfony-api-template contains the following files

Loading the files please wait ....