Commit d7c856e1 authored by Mat's avatar Mat

installation FOSjsRoutingBundle ->

* cfr:
https://symfony.com/doc/master/bundles/FOSJsRoutingBundle/installation.html
* composer require friendsofsymfony/jsrouting-bundle
* edit app/AppKernel.php et app/config/routing.yml
* php bin/console assets:install --symlink web (symlink-> option linux)
  !! attention les modifs de assets:install sont dans vendor, il faut
refaire cette commande sur le serveur prod !!

+ little modif sur readme
parent 592ff52c
......@@ -40,12 +40,8 @@ annotation + PHP toolbox
10. Générer le bundle
* php bin/console doctrine:generate:bundle
11. Editer composer.json
> * ajouter: "Namespace\\" : "src/Bundle"
> * PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException:
> Attempted to load class "VincentBundle" from namespace "VincentBundle".
> Did you forget a "use" statement for another namespace? in
> C:\xampp\htdocs\Symfony\VincentClean\app\AppKernel.php:19
* ajouter: "Namespace\\" : "src/Bundle"
* PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "VincentBundle" from namespace "VincentBundle". Did you forget a "use" statement for another namespace? in C:\xampp\htdocs\Symfony\VincentClean\app\AppKernel.php:19
12. Autoloader composer.phar
* php composer.phar dump-autoload
13. CLEAN UP
......
......@@ -20,6 +20,7 @@ class AppKernel extends Kernel
new AssoBundle\AssoBundle(),
new APIBundle\APIBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
api:
resource: "@APIBundle/Resources/config/routing.yml"
prefix: /API/v1
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "db4b27ced93694476978e579d15e4eaa",
"content-hash": "497196b1a309623619011eb58a446e34",
"packages": [
{
"name": "composer/ca-bundle",
......@@ -889,6 +889,65 @@
],
"time": "2016-10-17T18:31:11+00:00"
},
{
"name": "friendsofsymfony/jsrouting-bundle",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git",
"reference": "0f74f4f9d73580bd039cee54c4744b546a6a7990"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/zipball/0f74f4f9d73580bd039cee54c4744b546a6a7990",
"reference": "0f74f4f9d73580bd039cee54c4744b546a6a7990",
"shasum": ""
},
"require": {
"php": "^5.3.9|^7.0",
"symfony/console": "~2.7||~3.0|^4.0",
"symfony/framework-bundle": "~2.7||~3.0|^4.0",
"symfony/serializer": "~2.7||~3.0|^4.0",
"willdurand/jsonp-callback-validator": "~1.0"
},
"require-dev": {
"symfony/expression-language": "~2.7||~3.0|^4.0",
"symfony/phpunit-bridge": "^3.3|^4.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"FOS\\JsRoutingBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "FriendsOfSymfony Community",
"homepage": "https://github.com/friendsofsymfony/FOSJsRoutingBundle/contributors"
},
{
"name": "William Durand",
"email": "will+git@drnd.me"
}
],
"description": "A pretty nice way to expose your Symfony2 routing to client applications.",
"homepage": "http://friendsofsymfony.github.com",
"keywords": [
"Js Routing",
"javascript",
"routing"
],
"time": "2018-02-07T20:08:48+00:00"
},
{
"name": "incenteev/composer-parameter-handler",
"version": "v2.1.3",
......@@ -2597,6 +2656,46 @@
"templating"
],
"time": "2018-03-20T04:25:58+00:00"
},
{
"name": "willdurand/jsonp-callback-validator",
"version": "v1.1.0",
"source": {
"type": "git",
"url": "https://github.com/willdurand/JsonpCallbackValidator.git",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909",
"reference": "1a7d388bb521959e612ef50c5c7b1691b097e909",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~3.7"
},
"type": "library",
"autoload": {
"psr-0": {
"JsonpCallbackValidator": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com",
"homepage": "http://www.willdurand.fr"
}
],
"description": "JSONP callback validator.",
"time": "2014-01-20T22:35:06+00:00"
}
],
"packages-dev": [
......
File mode changed from 100755 to 100644
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment