Categories
Uncategorized

Symfony doctrine remove column from entity table

I had to dig and dig and dig to find this. Explanation here.

php bin/console doctrine:migrations:diff

instead of making a migration, this command makes the migration file for you. Then you can run this command

php bin/console doctrine:migrations:migrate

To actually change the table.

Categories
Resources Web Development

How to output Symfony environmental variables

I couldn’t remember where the hell I had seen this in the documentation so I am linking to it here. Why?

Because it absolutely isn’t where you would expect it to be like listed under Environmental variables. Hell no why list that shit there that’s all logical and shit.

It is actually under configuration all the way to the bottom under “List environment variables.” Would be so nice if that was in the Enironmental Variables page instead or a link to it or mention of it.

Categories
Resources Web Security

Symfony doctrine database secret configuration links and resources.

Storing secrets for Symfony applications – some ideas how to approach the topic

Categories
Resources Web Development

Symfony how to list environmental variables

I know I’ll never remember where I saw this. One day I will need to dump or check the environmental variables for my app.

The documentation here lists how to check the environmental variables towards the bottom of the page.

Categories
Resources Web Development

Symfony framework links with descriptions

I have this problem where I remember like 75% of what I read, but can’t remember where when I want to review information to make sure I remember things correctly. I prefer to look things up rather than screw them up based on memory, because I would screw things up at least 25% of the time. LOL

So this is my list of symfony documentation links with explanations so I can remember where I read what later.

How to Use a Form without a Data Class – from the docs, this example and article talk about how to create forms where the data of the form belongs to two different tables. A lot of the time data from forms will be stored in multiple tables then reassembled when needed later. Symfony quick docs assume you are having a 1:1 form to table situation or using an ORM I hate ORM’s I have seen them destroy the performance of apps and you don’t know until PRODUCTION TIME WOOHOOO YAY!!!!!!! You should see the goofey ass structure some create and the insane queries.

Forms – Symfony documentation mentioned above. This assumes the 1:1 table to form use case. This is rarely the case for me. This works best with data that can be stored in NoSQL databases. NoSQL is all the rage and hype because new developers have no clue what they are doing. NoSQL has specific use cases otherwise you are creating a bowl of mashed spaghetti which will eventually become so slow your app will fail due to users quitting. NoSQL is best when your data structure will change or has no real definition. User profiles are a good use case for NoSQL. RDBMS have their specific use cases and so do Graph databases. NoSQL has many forms too, document store, key value and more. Learning the different types of Database and what they are used for will prevent you from making a bowl of Mashed spaghetti. This book is has excellent coverage of the subjects.

Categories
Resources Web Development

Symfony encore webpack compiling scss

I couldn’t remember where the hell in the documentation I saw this. This is how you tell yarn to run encore and compile everything.

Down below the section Configuring Encore/webpack