I have coded a webapp in php 7+ and symfony 3.4, everything works fine in dev mode.
Then I tried this command :
composer install --no-dev
and this error occured :
[RuntimeException] An error occurred when executing the ""cache:clear --no-warmup"" command:
Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "FullCalendarBundle" from namespace "Toiba\FullCalendarBundle". Did you forget a "use" statement for another namespace? in F:\wamp64\www\justdrive\app\AppKernel.php:15
I have tried to modify this :
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
to this :
"psr-4": {
"": "src/"
},
and then execute this command :
composer dump-autoload
but I still get the same error after the first command I mentionned.
here is the bundle in my composer .lock
{
"name": "toiba/fullcalendar-bundle",
"version": "v6.2.4",
"source": {
"type": "git",
"url": "https://github.com/toiba/FullCalendarBundle.git",
"reference": "d8b22cc3a159819fa2a4bbd1c7aad026c6bbad74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/toiba/FullCalendarBundle/zipball/d8b22cc3a159819fa2a4bbd1c7aad026c6bbad74",
"reference": "d8b22cc3a159819fa2a4bbd1c7aad026c6bbad74",
"shasum": ""
},
"require": {
"php": "^5.5|^7.0",
"symfony/framework-bundle": "^3.4|^4.0"
},
"require-dev": {
"phpspec/phpspec": "^2.5"
},
"type": "symfony-bundle",
"autoload": {
"psr-4": {
"Toiba\\FullCalendarBundle\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Rebeca Mora Anca",
"email": "anca.rebeca@gmail.com",
"role": "Developer"
},
{
"name": "Théo Attali",
"email": "theoattali@gmail.com",
"role": "Developer"
}
],
"description": "Symfony integration of FullCalendar.js library. Events can be stored with Doctrine, MongoDB, CouchDB and others",
"homepage": "https://github.com/toiba/FullCalendarBundle",
"keywords": [
"calendar",
"fullcalendar",
"jquery calendar",
"symfony calendar"
],
"abandoned": "https://github.com/tattali/CalendarBundle",
"time": "2018-08-09T18:06:32+00:00"
}
Here is the bundle in appkernel.php
public function registerBundles()
{
$bundles = [
...
new Toiba\FullCalendarBundle\FullCalendarBundle(),
...
];
Can you please help me?