Skip to content

Commit

Permalink
update readme for symfony usage (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenlu authored Mar 25, 2024
1 parent 94b7590 commit dc161cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ env "doctrine" {

#### As PHP Script

If you have multiple folders with Doctrine entities, you might want to use the provider as a php script.
If you have multiple folders with Doctrine entities, or if you use a [Symfony](https://symfony.com/) project,
you might want to use the provider as a PHP script.

create a new file named `atlas.php` with the following contents:

Expand All @@ -83,7 +84,8 @@ create a new file named `atlas.php` with the following contents:
require "vendor/autoload.php";
require "vendor/ariga/atlas-provider-doctrine/src/LoadEntities.php";

print (DumpDDL(["./path/to/first/entities", "./path/to/more/entities"], "mysql"));
// `DumpDDL` accepts an array of paths to your Doctrine entities and the database dialect(mysql | mariadb | postgres | sqlite | sqlserver).
print (DumpDDL(["./src/Entity"], "mysql"));
```

Then in your project directory, create a new file named `atlas.hcl` with the following contents:
Expand Down

0 comments on commit dc161cc

Please sign in to comment.