Symfony - tool that enables loading of configurations

I am currently in the process of setting up FOSUserBundle according to the provided documentation.

To start, I have created a fos_user.yaml file in the config/packages directory with the following configurations:

fos_user:
db_driver: orm
firewall_name: main
user_class: bundles\App\Base\Entity\User
from_email:
    address: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4a27330a272b232664292527">[email protected]</a>"
    sender_name: "Name Surname"
framework:
    translator: ~

Unfortunately, I keep encountering an error message:

There is no extension available to load the configuration for "from_email" (in /
!! var/www/html/config/packages/fos_user.yaml). Looked for namespace "from_ema
!! il", found "framework", "sensio_framework_extra", "doctrine_cache", "doctri
!! ne", "doctrine_migrations", "maker", "security", "swiftmailer", "stof_doctr
!! ine_extensions", "doctrine_fixtures", "twig", "twig_extra", "fos_user"

I attempted creating a separate from_email.yaml file, but that did not resolve the issue.

Answer №1

Your fos_user.yaml file's configuration lacks proper indentation.

If you fail to indent the values under the fos_user key, Symfony will attempt to locate a configuration file for each of them.

A properly formatted version would look like this:

fos_user:
    db_driver: orm
    firewall_name: main
    user_class: bundles\App\Base\Entity\User
    from_email:
        address: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a8c5d1e8c5c9c1c486cbc7c5">[email protected]</a>"
        sender_name: "Name Surname"

For more information, refer to the complete bundle configuration here

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I output HTML code using php echo without using quotation marks?

My issue involves printing out HTML code that is not stored as a simple string, requiring me to decode it before echoing. The problem arises when I echo the decoded value and unwanted quotes appear, disrupting the output. Here's an example: <div> ...

Utilize a shared public variable across all functions within a PHP class

Assume I have the following PHP code: class modual { public $glo; static public function SaveData($RDesTechni = 1,$RCapacity = 2){ try{ $sql = "INSERT INTO tblworkfaire VALUES('',$RDesTechni,$RCapacity)"; $qry=mysql_query($s ...

Incorporate Product Choices into Shopping Cart using AJAX and <form> | Opencart

I'm new here and would really appreciate any help with my first question. I've searched for related information, but nothing quite fits what I need. Currently, I'm attempting to add a product along with its options to the cart using an HTML ...

Is there a workaround for automatically printing generated PDF files (such as labels and packing slips) from the backend to pre-selected printers directly from a browser?

In the process of creating my web application, I am in need of a solution for automatically printing PDF files (such as labels and packing slips) to pre-selected LAN network printers located in my warehouse from the admin backend. I understand that due to ...

"Troubleshooting: Vue JS Axios Post Request Not Passing Data to PHP Server

After successfully uploading an image in Vue JS and sending a POST request to a Laravel Route, the JSON response from the API is displayed on the client side as expected. However, there seems to be an issue with retrieving this response in PHP, as it retur ...

issue with retrieving data from PHP script via ajax

My attempts to use AJAX to call a PHP script have been unsuccessful. I added an echo alert statement in my deleteitem.php script to ensure it was being called, but no matter what I tried, it never executed. Both the PHP script and the JS script calling it ...

$_POST is unable to read POST parameters when using AJAX

I've been facing an issue with sending data to my PHP script. Interestingly, everything works smoothly when using POSTMAN and the results are displayed correctly. However, when attempting to send the data through AJAX in my HTML project, the PHP scrip ...

Debugging an Asterisk AGI file in PHP

Looking for help debugging the AGI script (a2billing.php) in Asterisk. I've been successful when remotely debugging PHP CLI from the Linux console, but it doesn't seem to work when running within Asterisk. Any suggestions on how to properly debu ...

Enable checkboxes to be pre-selected upon page loading automatically

Although I've found a lot of code snippets for a "select all" option, what I really need is more direct. I want the WpForms checkboxes to be pre-checked by default when the page loads, instead of requiring users to press a button. My goal is to have a ...

Communication between IOS and PHP applications

My phone data needs to be securely transmitted to my server without encryption. The priority is ensuring that the data originates from my app and not just a browser refresh. I am seeking creative ideas on how to achieve this. Any suggestions would be muc ...

Incorporate a PHP variable named "result" into a MySQL query

Is it feasible to integrate PHP data into a MySQL result? Let me elaborate: Consider two tables, one containing user actions and the other user information. By querying the actions table, I retrieve user IDs and count each one grouped by the user: $ids = ...

Are you familiar with the concept of using predefined tasks in PHP with Cron

Is there a way to run a scheduled script that posts new content to my website at various random times? I may need to post data on different days and times, such as Monday at 9am and Tuesday at midday. I was considering using a database to store each piece ...

What causes an Undefined array key error when using AJAX POST?

I am having trouble passing a text string to a PHP Variable using AJAX. Every time the POST request is sent, I see this error message: Warning: Undefined array key "mydata" Although the alert displays the correct value, the PHP page shows the ...

Enhancing Website Interactivity with PHP, AJAX, and

I recently followed a tutorial on handling AJAX requests with PHP and MySQL, which can be found here. My goal is to update the SQL query based on the value selected from a dropdown menu using the onchange event. function myfunctionTime(time) { if (t ...

Are we sure Smarty 3 has a trusted directory?

I am struggling to find out where to specify the trusted_dir variable in Smarty 3. Every time I attempt to use {insert name="func_name" script="thescript"}, I encounter the error "missing script file". Is there anyone who knows how to resolve this? My $sm ...

Memory leakage during the traversal of an object network

Is object graph traversal in doctrine scalable? Take a look at this entity with a graph-like structure (which is guaranteed to be acyclic): /** * @ORM\Entity() */ class Node { //... /** * @ORM\ManyToOne(targetEntity="Node&q ...

PHP not displaying radio button values

My latest project involved creating a quiz program using only PHP. The program consists of 4 different questions and radio buttons, and when an option is selected, the value of the radio button (A, B, C, or D) should be printed. I have set up 4 PHP varia ...

Show an image based on a query parameter

Currently, I am developing a PHP project and I am facing an issue with loading an image from a query string. Here is the code snippet I am using: <img src="load_image.php?name=Profile_Photo_Small" /> Is there anyone who can help me out with this pro ...

Opting for Fetch API over Ajax for requests that involve Allow-Credentials and require POST methods

In this particular scenario, the utilization of Access-Control-Allow-Credentials accompanied by the POST method is key in managing server-side PHP session variables that need to remain stable. To provide some context, the front-end aspect involves a creat ...

Working on a PHP tokenizing algorithm

I have a Perl script that tokenizes a string using separators. @s=split /([^a-zA-Z \t\-\'\,\.]+)/, $_[0]; # Tokenized with separators For example, if I have the string $s="The large [[bear]] is dangerous." It will return a ...