513 search results

Integration Testing Emails

…the same for Twig: self::$container->get(Environment::class). I love that! Again, the downside is that you really do need to have wkhtmltopdf installed correctly anywhere you run your tests. That's the cost of doing this. Before we try it, at the bottom…

8:50
Using a Base Email Template

…6 authors... or really, 6 users that are subscribed to the newsletter... but anywhere from 0 to 6 of these might actually have recent articles. Spin over to Mailtrap. If you don't see any emails - try reloading the fixtures again... just in case you…

8:54
Context Builder & Service Decoration

…it talks about changing the serialization context dynamically and gives an example. Steal this BookContextBuilder code. This class can live anywhere in src/, but to follow the docs, let's create a Serializer/ directory and a new PHP class inside of that called AdminGroupsContextBuilder... because…

6:50
Login Success & the Session

…may make it less secure. As a general rule, while you can use API tokens in your JavaScript, you should never store them anywhere - like local storage of cookies due to security. That makes using API tokens in JavaScript... tricky. So... if we're not…

4:28
Bootstrapping the Bundle & Autoloading

…move the KnpUIpsum class into that directory. And yea, you could put this into a src/Service directory, or anywhere else you want. Oh, but this namespace will not work anymore. We need a namespace that's custom to our bundle. It could be anything…

7:21
Child Component

…answer that, there is technically another option: we could just move the highlightedRowId state into the RepLogList component. And, technically, this would work! Look closely: RepLogApp isn't using that data anywhere else! So if we moved the state, everything would work! But... for a…

8:35
Creating a Service Class

…click one of the genuses. Yes! The fun fact is screaming at us in upper case. So believe it or not: you just saw one of the most important and commonly-confusing object-oriented strategies that exist anywhere... in any language! And it's this…

3:11
Routing: The URLs of the World

…pull it in. So, even though Symfony only reads this one routing file, we can pull in routes from anywhere. So what's up with the @EventBundle magic? The resource should just point to the path of another file, relative to this one. But if…

5:44
Downloading & Configuration

…that didn't work. So let's try pasting the command instead. If you have PHP 5.4 installed, run this anywhere: we'll use PHP's built-in web server. If you don't, get with it! PHP 5.3 is ancient. But anyways…

10:02
Gherkin

…while vacationing thousands of miles away. Feature: Remote fence control API In order to control fence security from anywhere As an API user I need to be able to POST JSON instructions that turn fences on/off The person benefiting in this case is our…

6:46
Configurar el despliegue de platform.sh

…stuff above or below. The config has mounts - for directories that you want to keep persistent between deploys - PHP extensions, your PHP version, and quite a bit more. Anywhere inside, paste the dependencies line... and make sure it's not indented. And just like that…

9:08
Review this Product... in a turbo-frame!

…we submit... gorgeous! Our new review even popped up right above the form! Though, hmm. There's no success message anywhere on the page. There was one before... but now it's gone! What happened? Look back at the network tools. There are two new…

7:50
Using a Full HTML Page to Populate a Frame

…In base.html.twig, scroll back down to that area. Surround this in a new {% block weather_widget %} and, on the other side, {% endblock %}. Back in index.html.twig, anywhere, override that block... but make it empty. Ok, refresh again and... cool! At this point…

7:24
Fixing External JS + Analytics Code

…it in your browser. It's minified... so pretty unreadable. Copy the source, close it, spin over to your editor and create a new file anywhere, like pizza.js... we're not going to actually use this. Paste the code, select it, then go back…

8:46
3rd Party JavaScript Widgets

…this... then go open templates/base.html.twig. Head to the bottom and paste this in the footer: right before the closing body tag... though you could put this anywhere. Cool: this gives us an a tag... which just says "New York weather". Then, my…

7:52
Fixing the Sweetalert Modal

…go forward and... it worked! Wait, I can't scroll... and nothing is clickable! Inspect element anywhere. Uh oh: a Sweetalert backdrop element is still there! It's invisible, but it's blocking the page! This is the exact same problem we just saw with…

7:14
State in your Controller

…usable methods in my controller as possible. The nice thing about setSelectedColor() is that it's not dependent on the event: before we were reading event.currentTarget. Now, anyone can call this method from anywhere, pass a color id and... everything will just work! Well…

6:26
Current Product Id

…read this in a Vue component? Well... it's a global variable... so we could put window.currentProductId anywhere. But in the last tutorial, we started centralizing these global variables into a services/page-context.js file. As a reminder, services/ is a directory that…

4:56
Adding a Watcher

…we didn't need it! All we needed to do - when onSearchProducts() was called - was use the term to immediately load the products. There was no need to store the search term anywhere for later. But now we do have a need! We do need…

5:13
Props: Passing Info into a Child Component

…dev tools are even more interesting! If you click on , you can still see the legend data, though, we're not using this anywhere at the moment. And when you click on , nice! You can see its props! We've just seen two…

4:49