#fosrestbundle
Explore tagged Tumblr posts
majpi · 8 years ago
Text
Pluralizacja w FosRestBundle
Wkurzała mnie liczba mnoga automatycznie generowana dla routingów w FosRestBundle. Co nalezy zmienić/zrobić. Idąc za cookbookiem:
Tworzymy własną klasę inflector  przy implementacji  interfejsu FOS\RestBundle\Inflector\InflectorInterface (zauważyć należy, że usunąłem Util ze  ścieżki ponieważ nie pokrywała się z tym co ja miałem u siebie w Vendorach).
Definiujemy service dla naszego inflectora
Każemy fos_rest używać naszego servicu jako inflectora
http://symfony.com/doc/current/bundles/FOSRestBundle/5-automatic-route-generation_single-restful-controller.html#changing-pluralization-in-generated-routes
0 notes
phpdeveloperfan · 5 years ago
Photo
Tumblr media
Symfony REST API (without FosRestBundle) using JWT authentication: PART 2 ☞ https://medium.com/@h.benkachoud/symfony-rest-api-without-fosrestbundle-using-jwt-authentication-part-2-be394d0924dd #php #laravel
0 notes
phpprogrammingblr · 5 years ago
Photo
Tumblr media
Symfony REST API (without FosRestBundle) using JWT authentication: PART 2 ☞ https://medium.com/@h.benkachoud/symfony-rest-api-without-fosrestbundle-using-jwt-authentication-part-2-be394d0924dd #php #laravel
0 notes
wordpresstemplateslove · 5 years ago
Photo
Tumblr media
Symfony REST API (without FosRestBundle) using JWT authentication: PART 2 ☞ https://medium.com/@h.benkachoud/symfony-rest-api-without-fosrestbundle-using-jwt-authentication-part-2-be394d0924dd #php #laravel
0 notes
ikonenn-blog · 9 years ago
Text
FOSOAuthServerBundle et FOSUserBundle - OAuth2
FOSOAuthServerBundle et FOSUserBundle – OAuth2
FOSOAuthServerBundle – implémentation de l’OAuth2 entre deux apps Objectif
Sur un projet il m’a fallu implémenter l’OAuth2 entre deux plates-formes à savoir une application Symfony2 (avec FOSOAuthServerBundle) et un site WordPress. L’objectif étant qu’un visiteur sur le site WordPress (déjà utilisateur ou non) puisse se logguer à son administration avec le mécanisme d’authentification présent sur…
View On WordPress
0 notes
tetsuwo · 13 years ago
Text
Symfony2 FOSRestBundle のインストール
※あとから手順をまとめたので間違っているかもしれません。 `FOSRestBundle` をインストールする。([参考](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/1-setting_up_the_bundle.md)) $ php composer.phar require friendsofsymfony/rest-bundle バンドルを有効にするために `app/AppKernel.php` に以下のように記述する。 // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new FOS\RestBundle\FOSRestBundle(), ); } 一旦キャッシュクリアする。 $ php app/console.php cache:clear --no-warmup [RuntimeException] You need to disable the view annotations in SensioFrameworkExtraBundle when using the FOSRestBundle View Response listener. エラー発生。 [Step 3: Listener support](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/3-listener-support.md) を参考にし、`app/config/config.yml` に以下を追記する。 // app/config/config.yml fos_rest: view: view_response_listener: force sensio_framework_extra: view: { annotations: false } router: { annotations: true } 今度こそキャッシュクリア。 $ php app/console.php cache:clear --no-warmup [Symfony\Component\DependencyInjection\Exception\InvalidArgumentException] The service definition "jms_serializer.serializer" does not exist. またもや...。 言われた通り、`JMSSerializerBundle` に `composer.json` に教える。 $ php composer.phar require jms/serializer-bundle[ENTER] $ 0.9.0 これで `composer.json` にも追加される。 // composer.json { // ... require: { // ... "jms/serializer-bundle": "0.9.0" } } インストールが終わったら、またもや `app/AppKernel.php` にバンドルを追加。 // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new JMS\SerializerBundle\JMSSerializerBundle($this), ); } これで完了かな。
0 notes