2725 search results for Doctrine

Dynamic Roles

... Give it the @ORM\Column annotation and set its type to json_array: This is really cool because the $roles property will hold an array of roles, but when we save, Doctrine will automatically json_encode that array and ...

4:10
The UserInterface Methods Keep some Blank

... leaving these blank. So in our application, we want to store users in the database. So let's set this class up with Doctrine. Copy the use statement from SubFamily and paste it here: Next, I'll put my cursor inside the ...

4:19
The All-Important User Class

... - like a central authentication server. In those cases, you will still have a User class, you just won't store it with Doctrine. More on that as we go along. Ok, we've got the empty user class: let's fill it in! ...

4:22
Binding Forms to Objects data_class

... that isPublished should be a checkbox because that's a boolean field in Doctrine: And since firstDiscoveredAt is a date, it rendered it with year-month-day drop-down boxes. Now, those three boxes are totally ugly and we'll ...

4:44
Webhooks Preventing Replay Attacks

... StripeEventLog: Give it a few properties: $id, $stripeEventId and a $handledAt date field: Since this project uses Doctrine, I'll add a special use statement on top and then add some annotations, so that this new class will become ...

5:41
Testing Part 2 Faking the Event Lookup

... Doctrine is tricking us! In reality, the database has been updated to show that the Subscription is canceled, but this Subscription object is out-of-date. Query for a fresh one with $subscription = $this->em - I set the ...

5:06
Webhook Subscription Canceled

... canceled. Below, really simple, say $subscription->cancel(). Then, use the Doctrine entity manager to save this to the database: Mind blown! Back in the controller, call this! Above the switch statement, add a ...

5:08
Adding Dynamic Roles to each User

... a JSON string. Doctrine takes care of converting back and forth between the array and JSON. Now, just update the getRoles() method to use this property and add a setRoles method: public function getRoles() { } public ...

4:56
... data, the backend admin can verify, update and enrich this lead. Finally the CLI can also act on the leads somehow in the workflow. In Doctrine this would be represented by a "Lead" entity and it should be shared between ...
Philipp Rieber
Philipp Rieber
Read Full Comment
Hey Dmirtiy, As I see you use migrations which is super cool! And despite the fact that Doctrine generate a migration for you to sync your DB schemas, you are totally able to write/add custom queries inside that ...
... to use with Doctrine ORM and Symfony form component? So do you guys at KNPU personally use DTO (which would solve the type hinting issue)? Using DTO seems impossible to update entities with OneToMany relationship for example, or am I missing something.. Thank you!
Anthony R.
Anthony R.
Read Full Comment
... reason is that we need to release "Database & Doctrine" and "Symfony Forms" courses before we start working on "Security, Registration and Authentication with Guard" one. Well, if you need this course now - we have a similar ...
... allow the user to install what they need. BUT, use Symfony Flex to make installation much easier :). So, there still *are* many packages that we recommend: like Twig *if* you need a templating engine or Doctrine *if* you ...
weaverryan
weaverryan
Read Full Comment
... Doctrine (a dependency of your project) simultaneously uses version 1.3. That's not possible in PHP, but (for better or worse, it has pros and cons) that *is* possible in Node land :). But you *are* safe with that fix - it's no magic. Hopefully now it makes a bit more sense at least! Cheers!
weaverryan
weaverryan
Read Full Comment
Had trouble loading doctrine-fixtures-bundle and nelmio/alice... when trying to do the require --dev for them I got all kinds of errors about symfony/symfony 3.1.4 satisfiable by v3.1.4 and so forth....on a bunch of ...
... app.security.login_form_authenticator: class: AppBundle\Security\LoginFormAuthenticator autowire: true app.doctrine.hash_password_listener: class: AppBundle\Doctrine\HashPasswordListener autowire ...
... >find(20); , here my DAO has the doctrine functions like find , findBy(etc). someone help me please object(Usuario)#109 (13) { ["rut":"Usuario":private]=> string(10) "17738715-0" ["nombre":"Usuario":private]=> NULL ...
sebastian
sebastian
Read Full Comment
Hey Vasili Repin First, you have to create a new class, just like an entity but this one won't be stored in the DB, i.e. won't be managed by doctrine. This new class will contain all the data you want to show in your ...
MolloKhan
MolloKhan
Read Full Comment
... simultaneously telling Doctrine "subFamily is a string column" and also "subFamily is an integer column, and it's a foreign key, so the integer value should be converted into a SubFamily object". This really should be an error, but instead, I think the second annotation simply "won". Cheers! ...
weaverryan
weaverryan
Read Full Comment
... " - Streamline template reference syntax to work cleanly with and without bundles (using Puli?) - Fixing Doctrine shortcuts, possibly using a reserved prefix, or better: no prefix if they don't belong to a bundle (from the ...
meandmymonkey
meandmymonkey
Read Full Comment