Closed colagrosso closed 3 months ago
I think this PR imports many of the changes that were made to master, which is causing merge conflicts and also makes it really hard to review.
Can you rebase your branch onto master first, then create a new PR that only includes changes from your branch? You can force push to this branch if necessary.
Yep, will do. I will have to force push to standardebooks:db-rewrite
, but that's fine.
Most of my work is on this commit, which might be easier to review separately:
Complete the DB write path: https://github.com/standardebooks/web/commit/f535e9f62355e30f14d7904d62cc100d171b2268
Created
andUpdated
in PHP code toEbookCreated
andEbookUpdated
to match the schemaGetFoo()
methods for all the derived properties likeGetUrl()
,GetHasDownloads()
, etc. Removed that logic from the constructor.Ebook::__construct()
tostatic Ebook::FromFilesystem()
./scripts/update-ebook-db to compare
. It compares objects fromEbook::FromFilesystem()
andEbook::GetByIdentifier()
to confirm there are no differences.With these changes, we have a fully populated DB. Running
deploy-ebook-to-www
like this:will populate the DB then read back the DB records with
Ebook::GetByIdentifier()
and confirm they match theEbook
object from the filesystem. Now that everything is written correctly, I can start on the read path, e.g.,ebook.php
.Sorry for all the other commits in this PR. That's what it took to bring this branch up to
master
and fix some merge conflicts. I confirmed there are no PHPStan errors. If it's too hard to review, I'll do something different.