Skip to content

Commit

Permalink
Symfony recipe is live, update installation steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 28, 2020
1 parent 5321218 commit 750e8e3
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions docs/pages/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Installation
============

This package does not yet have a Symfony Flex recipe. Installation steps must be done manually.
This package has `a Symfony Flex recipe`_ that will install configuration files for you.

Default configuration files will be copied in the `dev` environment except for the file defining
the services.
Default configuration files will be copied in the `dev` environment.

Step 1
~~~~~~
Expand All @@ -17,7 +16,7 @@ The recommended way to install it is with Composer_ :
composer require ecphp/cas-bundle
.. warning:: If you use `API Platform`_, then it's possible that some url will contains parameters with
.. warning:: If you use `API Platform`_ and Symfony < 5.2, then it's possible that some URLs contains parameters with
a dot inside. By default, Symfony mangles url parameters having dot with an underscore, which can lead in huge
inconsistencies if you heavily rely on query parameters like in API Platform.

Expand All @@ -30,26 +29,6 @@ The recommended way to install it is with Composer_ :
Step 2
~~~~~~

Make sure that the bundle is enabled in `config/bundles.php`.

You should see a line that looks like the following:

.. code-block:: php
EcPhp\CasBundle\CasBundle::class => ['all' => true],
Step 3
~~~~~~

Recursively copy the content of the `Resources/config` folder in `config/` folder.

.. code-block:: bash
cp -ar vendor/ecphp/cas-bundle/Resources/config/* config/
Step 4
~~~~~~

This is the crucial part of your application's security configuration.

Edit the security settings of your application by edition the file `config/packages/security.yaml`.
Expand All @@ -75,7 +54,7 @@ with `/api` or `/admin`, therefore make sure that at least such paths exists.
Feel free to change these configuration to fits your need. Have a look at
`the Symfony documentation about security and Guard authentication`_.

Step 5
Step 3
~~~~~~

The CAS protocol requires HTTPS on both side (client and server) in order
Expand All @@ -101,7 +80,7 @@ Feel free to customize it or remove it when switching to another environment.
If you plan to change the HTTP client, those settings will most probably need
to be updated accordingly.

Step 6
Step 4
~~~~~~

The default configuration of this bundle comes with a configuration for authenticating with a real
Expand Down Expand Up @@ -129,6 +108,7 @@ The `source`_ of that server are hosted on Github.
If you prefer using a local CAS server, you can choose to build your own using the tool you prefer.
The quickest solution for a working CAS server on any platform is this `Docker project`_.

.. _a Symfony Flex recipe: https://github.com/symfony/recipes-contrib/blob/master/ecphp/cas-bundle/2.0/manifest.json
.. _Composer: https://getcomposer.org
.. _symfony/http-client: https://packagist.org/packages/symfony/http-client
.. _https://heroku-cas-server.herokuapp.com/cas/: https://heroku-cas-server.herokuapp.com/cas/
Expand Down

0 comments on commit 750e8e3

Please sign in to comment.