Setting up my Behat tests in a Selenium environment has been quite a challenge for me. Currently, I have managed to start Selenium with Docker. This is what my docker-compose.yml configuration looks like: hub: image: selenium/hub ports: - "4444:4 ...
Is there a way to create a request filter for post actions in a JSON REST API that takes the request's body, fills the DTO, validates it, and injects it into the controller action like paramconverter? I have an ExampleDTO structured like this: class ...
Currently, I am involved in a Symfony 3 and Doctrine project where I am dealing with a many-to-many relationship between Pack and Produit: Pack Entity: class Pack { /** * @var ArrayCollection | Produit[] * @ORMManyToMany(targetEntity="App ...
Imagine we have a collection of entities: $entities = $em->getRepository('MyBundle:Entity')->findBy(array('cat' => 1)); What is the most efficient way to retrieve a single entity from this collection by its ID? While iteratin ...
When I execute bin/behat @FootballTeamBundle in the terminal as a standalone command, the error screenshots are captured and stored under the build/behat/ directory, which works fine. However, when I run bin/phing, the entire FeatureContext file appears to ...
This question has been asked multiple times before: Symfony 3.4 and Fixtures Bundle issue with bundle version 3.0 Symfony 3.4.0 Could not find any fixture services to load Symfony Doctrine can't find fixtures to load Could not find any fixture servi ...
Struggling to configure Behat tests for mobile devices in a Symfony2 project. I currently have the Selenium standalone server with Chromedriver running. Below is my behat.yml configuration file: default: suites: default: contexts: - ...
After reviewing this specific commit, it appears that there is now an option to set a custom application name and version for the WebProfiler. This raises the question of what the recommended method for doing so is? /** * Constructor. * * @param string ...
I'm feeling a bit lost with the issue I'm facing here. Everything was working fine with my app, but then something changed and now I'm encountering this error. I even tried clearing my dev cache, but no luck. I suspect it might have been due ...
Implementing CKEditor in a symfony project using the FOS\CKEditor-bundle 1.2. I want to style the entire element containing CKEditor with a border when it is focused, similar to how questions are written or answered on Stackoverflow. By referencing a ...
I've been attempting to integrate Doctrine ORM with Silex, but I'm encountering a frustrating challenge due to the inconsistent documentation provided. Upon running vendor/bin/doctrine in the console, the following message is displayed: output: ...
After numerous attempts, I believe I have finally mastered the documentation. However, I am puzzled by an error that Doctrine keeps showing me: Invalid parameter number: the count of bound variables does not match the count of tokens Below is the code ...
My client is uploading files embedded in JSON objects which include metadata for each file. The challenge I am facing is not knowing the exact number of files they will upload, so I need a dynamic solution. Currently, I have a javascript object called fi ...
Is it possible to modify a set function of an entity based on a field from another entity? I have a field in table 1 (column E) that could contain either the value from column C or D (although having two fields with the same information seems messy, I am ...
I am trying to pass a JavaScript variable to a twig path but the current method I am using is not working as expected. <p id="result"></p> <script> var text = ""; var i; for (varJS = 0; varJS < 5; varJS++) { text += "<a href= ...
I'm currently working on a symfony app that offers REST based services. One of the modules I have is called UserBundle, which handles user login, logout, and registration actions. In addition to the UserBundle, I have other bundles that provide resources ...
I have successfully implemented FosUserBundle with the regular web/app_dev.php/login login. The AuthenticationHandler is set up as shown here. When my Angular application sends a JSON request, it includes the following data: _csrf_token: "uSRZfxMycFCLKbx ...
After discovering gitlab-ci to automate my development tasks, I successfully set up a "test" stage for running unit tests. Everything was working perfectly until I hit a roadblock: I wanted to automatically deploy to my dedicated server upon MR approval. ...
I am utilizing jQuery to modify my form, which is created using Symfony. The form is displayed within a jQuery dialog and then submitted. Data is successfully stored in the database. However, I am unsure if I need to send some JSON back to jQuery. I am ...
While I have been using my own authentication and authorization code with Symfony2 as a framework, I recently decided to explore Symfony's security system. Following the tutorial on their website, I successfully set up login using my database. However, no ...
Need help! I am struggling with sending data from my Vue app to Symfony using axios. Even though I try to send the data, the Symfony request doesn't seem to receive it. Check out my controller code below: $form = $this->createForm(TeacherType::class); ...
In the entity Foo, I have a special property called $character property. This property is actually another entity (AppBundleEntityCharacter). When serializing Foo, I only want to include the nickname of the Character entity, not the entire thing. To a ...
Within a form, I have a select field (choiceType) that automatically populates with all the lines from another table. I am trying to modify just the label of the select field without changing its content... For textType fields, I was able to achieve this ...
Hey everyone, I'm looking to implement real-time flash message notifications for users when they receive a new private message in their inbox. What is the most effective way to achieve this using technologies like PHP 5.3, jQuery, and JSON? I prefer using ...
I am currently working on a project using Symfony4 with api-platform. The login process is defined in security.yaml as follows: security: encoders: AppEntityUser: bcrypt providers: our_db_provider: entity: class: AppEntityU ...
Starting from the beginning. I have a tab-panned layout with links. Upon clicking a link, a drop-down checkbox form is injected directly into the HTML through $(".dropdown-toggle").click(function() { var projectId = $("#permission-form").attr("data-p ...
Currently, I am attempting to integrate Panther with PhpUnit in my project. However, I am encountering an issue when trying to log a user in the following manner: $client = static::createPantherClient(); /** @var User $user */ $use ...
I'm currently working on setting up selenium in a docker container to use with Behat. However, when I check the status of the hub at http://localhost:4444/status, it shows that it is not ready: { "value": { "ready": false, &qu ...
1) cms 2) cms_translations cms id url status cms_translations object_id title lang_id I have also created a cmsRepository file for handling this. $q = $em->createQuery("SELECT c , d FROM Dashboard\CmsBundle\Entity\Cms c JO ...
I'm developing an API using the FOSRest Bundle for creating a RESTful service. Currently, I am returning data along with custom headers by implementing the following code: class InvestorController extends AbstractFOSRestController { /** * This m ...
I need assistance with implementing a button in my twig file within a table that will remove an element from an array. Ideally, I would like to remove the element based on its index. From the research I have conducted, it seems that data manipulation shou ...
After setting up a Symfony 2 project, I decided to access it through a virtual host using the URL my_project.dev. However, when I visit this URL, it displays the index of my project instead of directing me to the desired home page. I am struggling to find ...
My application includes a Category entity that holds various Assets. The Category has a method called getCount which returns the number of assets it contains. Recently, there was a feature update that introduced new types of assets such as external and in ...
I am implementing a controller to download files only for registered users. For example: www.myapp.com/download/123.jpg If a registered user tries to access this link without being logged in, the system redirects them to the login page. After logging ...
How can I make a link appear active when clicked, and keep it active while the user is on that page? (Using Symfony2 with Twitter bootstrap) <ul class="nav nav-list"> <li class="active"> <a href="/link1">Link</a> </li> &l ...
While working on the development of my CMS, I encountered a specific issue that I need assistance with. The error message I am facing is as follows: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\Entity" in class ScyLabs\G ...
In my templates, I have the following code snippet for generating routes with parameters: <a class="btn btn-block btn-abcd" href="{{ path( 'auth.login', { 'type': constant('User::TYPE_CANDIDATE'), 'provider': constant('UserProvi ...
The issue is specific to the debug toolbar. Highlighted below is the code section I suspect might be causing the problem /** * @Route("/{category_slug}/{slug}", name="content_show") * @ParamConverter("content", options={"mapping": {"slug": "slug"}} ...
I'm having an issue while building a Symfony API with the bundle. Every request I send results in an empty body response. Here is the code snippet of the Controller: class IndexController extends AbstractFOSRestController { /** * @Rest\ ...
Why do I keep encountering errors when trying to use "yarn run encore dev"? Whenever I attempt to add Sass, I receive a warning stating that "[email protected]" has an unmet peer dependency of "webpack@^2.0.0 || ^3.0.0 || ^4.0.0". But why is this happ ...
I am currently working on a Symfony 3.4 project and I'm encountering some issues while trying to install the Dotenv component. After running the command composer require symfony/dotenv:^3.4, Composer indicates that there is "Nothing to install update. ...
As a beginner with Symfony, I am currently working on a project that involves making UI changes. However, I am facing an issue where the changes I make are not reflected on the screen until I manually delete the cache files located in app/cache. While this ...