Why is this Symfony annotation not working?

Before I start, I should mention that this is&nbsp;<strong>Symfony 2.8.25</strong>. (I just started working on this code base, and once we get some critical issues resolved, we'll be upgrading.)

Before I start, I should mention that this is Symfony 2.8.25. (I just started working on this code base, and once we get some critical issues resolved, we'll be upgrading.)

I have an existing class using annotations with a number of routes that work fine.

I added a new one, and I get a 404 on that one every time. I did a console cache:clear which did not help. When I did a console debug:route, the new Routes appear in the list. But I still get a 404 on them, while the others in the same source file work.

All the routes use a POST, the working and non-working ones.

The routing.yml looks like this:

app:
    resource: '@AppBundle/Controller/'
    type: annotation

logout:
path: /logout

The class looks like this:

<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Entity\Environment;
use AppBundle\Entity\Instance;
use AppBundle\Entity\Migration;
use AppBundle\Entity\UserActivity;
use AppBundle\Entity\Task;
use AppBundle\Form\Environment\EnvironmentType;
use AppBundle\Services\Api;
use AppBundle\Utils\HashRequest;

class EnvironmentController extends Controller
{
...
/**
*
* @Route("/api/envtype/add", name="api_envtype_add")
*
*/
public function addEnvtypeAction(Request $request){
...

When I try another route from this same class, it works. But not this new one.

I tried renaming the route, and that made no difference. I checked the annotation comment for TABs, since that's a (semi-)known bug in older versions. No TABs in the annotation.

This annotation looks to me exactly like the others that work. (None of them have a @return, for example.)

PostMan reports No route found for "POST /api/envtype/add"

I am completely out of ideas.

What is Symfony? Features and applications

**Symfony is a PHP framework** whose work in building and maintaining web applications works very quickly and turns into recurring coding tasks. There are some prerequisites to start it in your computer-Such as - Linux, FreeBSD, Mac OS or...

Symfony is a PHP framework whose work in building and maintaining web applications works very quickly and turns into recurring coding tasks. There are some prerequisites to start it in your computer-Such as - Linux, FreeBSD, Mac OS or Microsoft Windows and a web server with PHP 5. The current version 1.2 only supports PHP 5.2 or higher, but previous versions can run on PHP 5.0 and 5.1 systems. it is compatible with almost every RDBMS (Relational Database Management System) and has low performance overheads.Unfortunately, like many other new, modern frameworks, Symphony also lacks support for PHP4, but, on the other hand,

Symfony framework overview

Symfony is an open-source MVC framework for rapidly developing modern web applications. Symfony is a full-stack web framework. It contains a set of reusable PHP components. ... Symfony components are being used by a lot of open source projects that include Composer, Drupal, and phpBB.

Enlist major features of Symfony?

There are some best features:-

1.Database engine-independent
2.Easy to install and configure on most platforms (and guaranteed to work on standard *nix and Windows platforms)
3.Very readable code, with phpDocumentor comments, for easy maintenance
4.Easy to extend, allowing for integration with other vendor libraries
5.Compliant with most web best practices and design patterns

Features Summary-Symfony,

Symfony, It is designed to optimize the development of web applications, for the features grows in with every release. Aimed at shortening the development time of complex web applications, it automates common tasks so that developers can focus only on the specificities of an application.

Symfony, which is designed to optimize the development of web applications, grows in features with every release. Aimed at shortening the development time of complex web applications, it automates common tasks so that developers can focus only on the specificities of an application.

Symfony - a database engine-independent PHP framework, which can be easily installed and configured, generates readable code with phpDocumentor comments. This MVC framework is easy to extend, features Propel plugins and allows integration with other vendor libraries. Developers can take advantage of the inbuilt internationalization layer allowing data and interface translation and content localization, and can reduce the amount of presentation code by encapsulating large shares of code in simple function calls. The presentation avails of templates and layouts that can be built by HTML designers who have no knowledge of the framework.

The in-built form generator offers automated validation and repopulation of the forms. All Symfony-built applications support output escaping which protects them from attacks via corrupted data.

The webmasters can benefit from the search-engine friendly routing, smart URLs, built-in e-mail and API management features, easily implementable Ajax interactions, and last, but definitely not least - one-line helpers that encapsulate cross-browser-compatible JavaScript effects.

Read more Symfony Interview Question for the best preparation of all programming languages, here you can read according your interview question and answers .

Thank You,

Symfony 3 application running on OSX

My Symfony 3.4 application is running super slow on DEV environment - it is taking about 35 seconds when using Docker and 20 seconds when running with Symfony's server.

My Symfony 3.4 application is running super slow on DEV environment - it is taking about 35 seconds when using Docker and 20 seconds when running with Symfony's server.

Profiler shows my controller takes too much time to compile.

Symfony Profiler

What I noticed is Symfony Profiler does not shows performance metrics when I run it using Docker - it does when I run using it's own server.

Any idea where I can look at? I already tried lots of workarounds without zero success.

Thanks