Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert from Laminas\Db to Doctrine #2233

Draft
wants to merge 371 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
674df7f
Merge branch 'dev' into doctrine
demiankatz Jan 24, 2024
595a747
Fix boolean compatibility for PostgreSQL.
demiankatz Jan 24, 2024
f74f2af
Merge branch 'dev' into doctrine
demiankatz Jan 25, 2024
df403da
Merge branch 'dev' into doctrine
demiankatz Jan 31, 2024
6b46209
Fix PHP version in comments.
demiankatz Feb 27, 2024
75864ea
Merge branch 'dev' into doctrine
demiankatz Feb 29, 2024
c604833
Fix cache initialization.
demiankatz Feb 29, 2024
1417509
Fix PHPUnit 10 compatibility.
demiankatz Feb 29, 2024
bbc8a37
Fix favorites logic.
demiankatz Feb 29, 2024
3829157
Do not access property on boolean.
demiankatz Feb 29, 2024
ac4e4dd
Fix problems with secure delegator.
demiankatz Feb 29, 2024
ed8b649
Fix PHPUnit 10 compatibility.
demiankatz Feb 29, 2024
c85e27b
Merge branch 'dev' into doctrine
demiankatz Mar 5, 2024
97b26b9
Improve catalog credential / library card code.
demiankatz Mar 5, 2024
318a75d
Merge branch 'dev' into doctrine
demiankatz Mar 6, 2024
1598e11
Fix InstallController.
demiankatz Mar 6, 2024
6c6f892
Port LibraryCard logic in SwitchDbHashCommand.
demiankatz Mar 6, 2024
2fcf884
Merge branch 'dev' into doctrine
demiankatz Mar 7, 2024
171b628
More specific return types.
demiankatz Mar 7, 2024
978fdc2
Simplify use statement.
demiankatz Mar 7, 2024
18c51b3
Merge branch 'dev' into doctrine
demiankatz Mar 11, 2024
5e08683
Add encrypt/decrypt wrapper methods for clarity.
demiankatz Mar 11, 2024
9e5b472
Rename database service base class/factory.
demiankatz Mar 11, 2024
184f528
More accurate typehint.
demiankatz Mar 11, 2024
81fd55c
Rename service aware trait/interface; clean up namespacing.
demiankatz Mar 11, 2024
16b2bd7
Merge branch 'dev' into doctrine
demiankatz Mar 12, 2024
e0e3011
Integrate EntityInterface with UserEntityInterface.
demiankatz Mar 12, 2024
5f94d99
Merge branch 'dev' into doctrine
demiankatz Mar 12, 2024
e8a3ba1
Merge branch 'dev' into doctrine
demiankatz Mar 12, 2024
5bcdd72
Improve comment.
demiankatz Mar 12, 2024
c795a90
Change return types to use interface.
demiankatz Mar 12, 2024
69be0c0
Merge branch 'dev' into doctrine
demiankatz Mar 14, 2024
d46dc14
Add missing methods.
demiankatz Mar 14, 2024
bcf9747
Merge commit 'cf7f140cd99a9ec1e46e9667e078be14ef45addf' into doctrine
demiankatz Mar 15, 2024
ce896ed
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Mar 15, 2024
b1379f4
Merge branch 'dev' into doctrine
demiankatz Mar 20, 2024
ba4d973
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Mar 20, 2024
3b7d5af
Merge branch 'dev' into doctrine
demiankatz Mar 21, 2024
b7e01f9
Merge branch 'dev' into doctrine
demiankatz Apr 2, 2024
d78d6cb
Merge branch 'dev' into doctrine
demiankatz Apr 3, 2024
9fe7c57
Merge branch 'dev' into doctrine
demiankatz Apr 3, 2024
eb04df7
Begin filling in AccessToken methods.
demiankatz Apr 3, 2024
cddaf67
Entity cleanup.
demiankatz Apr 3, 2024
e4ba78f
Merge branch 'dev' into doctrine
demiankatz Apr 3, 2024
b5caf38
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 4, 2024
565a5f1
Merge branch 'dev' into doctrine
demiankatz Apr 4, 2024
48a8803
Merge branch 'dev' into doctrine
demiankatz Apr 4, 2024
3af2d9c
Move, simplify and type addComment method.
demiankatz Apr 5, 2024
2b72898
Fix case typo.
demiankatz Apr 8, 2024
28aced6
Merge branch 'dev' into doctrine
demiankatz Apr 10, 2024
6b1a923
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 10, 2024
44279fb
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 10, 2024
00d7249
Merge branch 'dev' into doctrine
demiankatz Apr 11, 2024
7587aa7
php-cs-fixer
demiankatz Apr 11, 2024
c23c16a
Adjust parameter order; simplify code.
demiankatz Apr 11, 2024
f5ae758
Merge branch 'dev' into doctrine
demiankatz Apr 12, 2024
824cb31
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 12, 2024
05aac84
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 12, 2024
6ab866b
Merge branch 'dev' into doctrine
demiankatz Apr 15, 2024
0162a5d
Minor CommentsService improvements.
demiankatz Apr 15, 2024
fba1b81
More simplification.
demiankatz Apr 15, 2024
d5ca090
Merge branch 'dev' into doctrine
demiankatz Apr 17, 2024
52ebbea
Merge branch 'dev' into doctrine
demiankatz Apr 18, 2024
b171451
Make OaiResumptionService::encodeParams() protected.
demiankatz Apr 18, 2024
d838806
Simplify and modernize test.
demiankatz Apr 18, 2024
da4f8e2
Merge branch 'dev' into doctrine
demiankatz Apr 19, 2024
ce45f61
Merge branch 'dev' into doctrine
demiankatz Apr 19, 2024
45012d6
Merge branch 'dev' into doctrine
demiankatz Apr 19, 2024
33f68ea
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 23, 2024
8cc38d2
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Apr 23, 2024
f30961a
Expand use of getDoctrineReference; improve types.
demiankatz Apr 23, 2024
b758443
Merge branch 'dev' into doctrine
demiankatz Apr 24, 2024
1a177a9
Merge branch 'dev' into doctrine
demiankatz Apr 24, 2024
57e4173
Merge branch 'dev' into doctrine
demiankatz Apr 26, 2024
ba68950
Add new methods to entity.
demiankatz Apr 26, 2024
8090b5a
Merge branch 'dev' into doctrine
demiankatz Apr 26, 2024
baf46ea
Merge branch 'dev' into doctrine
demiankatz May 2, 2024
7cc3e87
Merge branch 'dev' into doctrine
demiankatz May 3, 2024
5e89774
Fix typo.
demiankatz May 10, 2024
e5b3136
Merge branch 'dev' into doctrine
demiankatz May 10, 2024
7b28efc
Merge branch 'dev' into doctrine
demiankatz May 13, 2024
8c3f509
Add missing method.
demiankatz May 13, 2024
628f095
Merge branch 'dev' into doctrine
demiankatz May 14, 2024
7cfac38
Roll back unnecessary change.
demiankatz May 14, 2024
c4dd770
Merge branch 'dev' into doctrine
demiankatz May 14, 2024
ca475d8
Clean up namespace usage.
demiankatz May 14, 2024
84e72ad
Improve editAllowed().
demiankatz May 14, 2024
2ab0644
Merge branch 'dev' into doctrine
demiankatz May 16, 2024
5234e6c
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 17, 2024
da00f37
Fix case of DateTime class.
demiankatz May 17, 2024
c1ca391
Merge branch 'dev' into doctrine
demiankatz May 17, 2024
70ac464
Add missing interface.
demiankatz May 17, 2024
babb53f
Remove unwanted throw.
demiankatz May 17, 2024
19be38f
Remove obsolete reference.
demiankatz May 17, 2024
3c5d0cf
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 17, 2024
eade5c4
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 17, 2024
861290e
Merge branch 'dev' into doctrine
demiankatz May 20, 2024
4043c57
Code simplifications.
demiankatz May 20, 2024
2d2ca1a
Fix broken test.
demiankatz May 20, 2024
44042cf
Merge branch 'dev' into doctrine
demiankatz May 20, 2024
14e57fa
Merge branch 'dev' into doctrine
demiankatz May 20, 2024
5cbe584
Merge branch 'dev' into doctrine
demiankatz May 22, 2024
453a289
Update bootstrap5 theme.
demiankatz May 22, 2024
0ff0d0a
Merge branch 'dev' into doctrine
demiankatz May 23, 2024
be1b9ce
Merge branch 'dev' into doctrine
demiankatz May 23, 2024
2ce9f85
Fix merge error.
demiankatz May 23, 2024
98ceede
Merge branch 'dev' into doctrine
demiankatz May 24, 2024
a1a9848
Merge branch 'dev' into doctrine
demiankatz May 24, 2024
1261085
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 24, 2024
7274bf2
Merge branch 'dev' into doctrine
demiankatz May 28, 2024
691838e
Add new interface methods to AuthHash entity.
demiankatz May 28, 2024
e0f9837
Merge branch 'dev' into doctrine
demiankatz May 28, 2024
f3e14e3
Implement ExternalSessionEntityInterface in entity class.
demiankatz May 28, 2024
0823739
Merge branch 'dev' into doctrine
demiankatz May 28, 2024
c9b3594
Merge branch 'dev' into doctrine
demiankatz May 29, 2024
39592d7
Merge branch 'dev' into doctrine
demiankatz May 29, 2024
25379a8
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 29, 2024
5c989be
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 29, 2024
d04d2e8
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz May 29, 2024
dde6b4e
Clean up comments.
demiankatz May 29, 2024
72646d5
More cleanup.
demiankatz May 29, 2024
f922264
Merge branch 'dev' into doctrine
demiankatz May 29, 2024
ee4bd71
Add testing of deleted records to OaiTest.
demiankatz May 29, 2024
3e2a614
Remove debug line.
demiankatz May 29, 2024
7a18a96
Merge branch 'dev' into doctrine
demiankatz May 29, 2024
0259d61
Merge branch 'oai-deleted-test' into doctrine
demiankatz May 29, 2024
de69786
Fix broken test.
demiankatz May 29, 2024
61e37dc
Merge branch 'dev' into doctrine
demiankatz May 29, 2024
5f068d9
Merge branch 'dev' into doctrine
demiankatz May 30, 2024
931156d
Remove unused method and associated test.
demiankatz May 30, 2024
bfd275c
php-cs-fixer
demiankatz May 30, 2024
15aa44e
Merge branch 'dev' into doctrine
demiankatz May 31, 2024
03bf4b9
Minor fix.
demiankatz May 31, 2024
e1c1c49
Merge branch 'dev' into doctrine
demiankatz May 31, 2024
56c60df
Reduce diffs.
demiankatz May 31, 2024
a5c6571
Clarify feedback templates.
demiankatz Jun 1, 2024
44c7f60
Fix test.
demiankatz Jun 1, 2024
83ad677
Merge branch 'dev' into doctrine
demiankatz Jun 3, 2024
b9115c2
Merge branch 'dev' into doctrine
demiankatz Jun 3, 2024
37ffd6f
Merge branch 'dev' into doctrine
demiankatz Jun 3, 2024
129214a
phpcbf
demiankatz Jun 3, 2024
9be382c
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 3, 2024
30ae6d0
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
4654027
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
2749e06
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
de77327
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
372b954
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
e4c8704
Merge branch 'dev' into doctrine
demiankatz Jun 5, 2024
f7601cc
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
31f40ae
Add missing return.
demiankatz Jun 6, 2024
1828a00
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
31db1e1
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
ac1d867
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
9ac7c41
php-cs-fixer
demiankatz Jun 6, 2024
6a5c793
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
5496dc7
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 6, 2024
acbeed1
Merge branch 'dev' into doctrine
demiankatz Jun 6, 2024
c6e2ad9
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
165dd62
Make \VuFind\Db\ConnectionFactory easier to extend (#30)
aleksip Jun 7, 2024
3e0a4bf
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
e409022
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
8006615
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
48bac86
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
2c163d2
Merge branch 'dev' into doctrine
demiankatz Jun 7, 2024
b5038b4
Remove unused code.
demiankatz Jun 7, 2024
b560761
Fix alphabetical order.
demiankatz Jun 7, 2024
c54034d
Revert unnecessary change.
demiankatz Jun 7, 2024
1d5c483
Merge branch 'dev' into doctrine
demiankatz Jun 10, 2024
3a2ee02
Merge branch 'dev' into doctrine
demiankatz Jun 10, 2024
c2206cc
Merge branch 'dev' into doctrine
demiankatz Jun 10, 2024
4fac62d
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 10, 2024
3ccfa60
Fix merge glitch.
demiankatz Jun 10, 2024
17f453d
php-cs-fixer.
demiankatz Jun 10, 2024
d0dec6a
Reduce unnecessary diffs.
demiankatz Jun 10, 2024
99b25f8
Make method protected since it's not used externally.
demiankatz Jun 10, 2024
c9e0592
Merge branch 'dev' into doctrine
demiankatz Jun 10, 2024
761c935
Merge branch 'dev' into doctrine
demiankatz Jun 10, 2024
4fdeff3
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
6dabb82
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
a892f12
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
68289c8
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
7a1012a
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 11, 2024
94e6c27
Minor user authentication improvements (follows #3625).
demiankatz Jun 11, 2024
3ca1f52
Merge branch 'user-auth-fixes' into doctrine
demiankatz Jun 11, 2024
f0f0087
php-cs-fixer.
demiankatz Jun 11, 2024
ed30fe4
Minor fix.
demiankatz Jun 11, 2024
0be4ee9
php-cs-fixer
demiankatz Jun 11, 2024
e370658
Reduce diffs.
demiankatz Jun 11, 2024
5f22be8
More diff reduction/simplification.
demiankatz Jun 11, 2024
62d0024
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
da3f5fb
Merge branch 'dev' into doctrine
demiankatz Jun 11, 2024
59d2afa
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
15ea6e1
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
e4d23b7
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
29a65c8
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
74c1aaa
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
eb53990
Fix tag sorting.
demiankatz Jun 12, 2024
9d384c4
Fix phpstan issue.
demiankatz Jun 12, 2024
5bb8928
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
a8af487
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
e2dd538
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 12, 2024
330d8b0
Fix bug.
demiankatz Jun 12, 2024
e9cd529
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
a710e35
Merge branch 'dev' into doctrine
demiankatz Jun 12, 2024
3026b96
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
09a423d
Style fixes.
demiankatz Jun 13, 2024
0a36939
Fix test.
demiankatz Jun 13, 2024
598d46d
More fixes.
demiankatz Jun 13, 2024
52d419e
One last fix.
demiankatz Jun 13, 2024
b2406c4
Remove deprecated method.
demiankatz Jun 13, 2024
eeffc8b
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
b61ce9b
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
5eb2d60
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
4d64f77
Reduce redundancy.
demiankatz Jun 13, 2024
16c7476
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
3a6f234
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
f14fe41
Merge branch 'dev' into doctrine
demiankatz Jun 13, 2024
a16a9dc
Merge remote-tracking branch 'origin/dev' into doctrine
demiankatz Jun 13, 2024
e7dce70
Merge branch 'dev' into doctrine
demiankatz Jun 14, 2024
d6cc727
Merge branch 'dev' into doctrine
demiankatz Jun 14, 2024
80c36dc
Merge branch 'dev' into doctrine
demiankatz Jun 14, 2024
02e7666
Bug fix.
demiankatz Jun 14, 2024
2ed20f0
Merge branch 'dev' into doctrine
demiankatz Jun 17, 2024
ba5fe82
Merge branch 'dev' into doctrine
demiankatz Jun 17, 2024
f4d4f23
Merge branch 'dev' into doctrine
demiankatz Jun 18, 2024
3ded82b
Merge branch 'dev' into doctrine
demiankatz Jun 18, 2024
ea58ce1
Fix issues.
demiankatz Jun 18, 2024
9fb5494
LoginToken Doctrine entity class (#31)
padmasreegade Jun 20, 2024
ae159c1
Merge branch 'dev' into doctrine
demiankatz Jul 2, 2024
17bae4d
Merge branch 'dev' into doctrine
demiankatz Aug 16, 2024
147a6cd
Merge branch 'dev' into doctrine
demiankatz Aug 27, 2024
19ece32
Merge branch 'dev' into doctrine
demiankatz Aug 28, 2024
a6796f3
Merge branch 'dev' into doctrine
demiankatz Aug 29, 2024
99df79f
Fix factory to use current interfaces.
demiankatz Aug 29, 2024
845df3d
Merge branch 'dev' into doctrine
demiankatz Sep 3, 2024
8916731
Merge branch 'dev' into doctrine
demiankatz Sep 4, 2024
4951130
Merge branch 'dev' into doctrine
demiankatz Sep 4, 2024
9e0c5c2
Access token service doctrine (#32)
padmasreegade Sep 4, 2024
60966f8
Merge branch 'dev-11.0' into doctrine
demiankatz Sep 5, 2024
26e19e6
Merge branch 'dev-11.0' into doctrine
demiankatz Sep 13, 2024
3ef5c51
Merge branch 'dev-11.0' into doctrine
demiankatz Sep 13, 2024
c21d9a6
Add SecretTrait support to database ConnectionFactory.
demiankatz Sep 13, 2024
0b04e24
Auth hash service doctrine (#33)
padmasreegade Sep 19, 2024
761a5f5
Merge branch 'dev-11.0' into doctrine
demiankatz Oct 8, 2024
6fb9c88
Merge branch 'dev-11.0' into doctrine
demiankatz Oct 22, 2024
8ad9a03
Merge branch 'dev' into doctrine
demiankatz Nov 1, 2024
e66a394
Merge branch 'dev' into doctrine
demiankatz Nov 5, 2024
5bc9ede
Merge branch 'dev' into doctrine
demiankatz Nov 15, 2024
40c8613
Merge branch 'dev' into doctrine
demiankatz Dec 2, 2024
9b86ddc
Migration of Login Token Service from Laminas to Doctrine. (#35)
padmasreegade Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"colinmollenhour/credis": "1.13.0",
"composer/package-versions-deprecated": "1.11.99.5",
"composer/semver": "3.3.2",
"doctrine/doctrine-orm-module": "^5.0",
"doctrine/orm": "^2.10.2",
"endroid/qr-code": "4.4.9",
"jasig/phpcas": "1.5.0",
"laminas/laminas-cache": "3.1.3",
Expand Down
1,857 changes: 1,329 additions & 528 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions config/application.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// Set up modules:
$modules = [
'DoctrineModule',
'DoctrineORMModule',
'Laminas\Cache',
'Laminas\Cache\Storage\Adapter\BlackHole',
'Laminas\Cache\Storage\Adapter\Filesystem',
Expand Down
6 changes: 6 additions & 0 deletions config/cli-config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$app = include __DIR__ . '/application.php';
return \Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet(
$app->getServiceManager()->get('doctrine.entity_manager.orm_default')
);
42 changes: 42 additions & 0 deletions module/VuFind/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
'service_manager' => [
'allow_override' => true,
'factories' => [
'Doctrine\ORM\Mapping\Driver\AnnotationDriver' => 'VuFind\Db\AnnotationDriverFactory',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksip, I see that you deleted this factory, but the configuration is still here. We should clean something up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, forgot to remove that line. Should I push the change to your branch or what would be the best way to work on this together?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please feel free to push directly here, as long as the code still works. I'm not going to be working on this much until next year, so I welcome any progress you can make in the meantime, and I don't anticipate that we'll "step on each other," so to speak.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if at any point it would be helpful to get a second opinion or anything, or if you would like me to run any tests, just let me know and I'll be happy to help!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@demiankatz I meant to push the changes to my repository and then point you there. Not sure how multi-user PRs should work... Should I push future suggested changes to my clone so you can then decide whether to merge to your branch from there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aleksip, it is possible to make a pull request against a pull request -- you can just target a PR against this branch. That might be the easiest workflow going forward, especially when multi-user collaboration picks up... but since things are quiet right now, feel free to work directly in this branch, at least until you get things into a correct/stable state again. (I think it's easier to just move forward and fix things than to roll back changes and make a separate PR, at least under the present circumstances).

Copy link
Contributor

@aleksip aleksip Nov 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@demiankatz Seems like I can create a PR for the branch in your repository! Should I do that? Edit: missed your above reply.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to try it as a proof-of-concept, feel free... but otherwise, as I said, you can just go ahead and push. :-)

'League\CommonMark\ConverterInterface' => 'VuFind\Service\MarkdownFactory',
'ProxyManager\Configuration' => 'VuFind\Service\ProxyConfigFactory',
'VuFind\AjaxHandler\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
Expand Down Expand Up @@ -378,7 +379,10 @@
'VuFind\Crypt\HMAC' => 'VuFind\Crypt\HMACFactory',
'VuFind\Date\Converter' => 'VuFind\Service\DateConverterFactory',
'VuFind\Db\AdapterFactory' => 'VuFind\Service\ServiceWithConfigIniFactory',
'VuFind\Db\Connection' => 'VuFind\Db\ConnectionFactory',
demiankatz marked this conversation as resolved.
Show resolved Hide resolved
'VuFind\Db\Entity\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\Db\Row\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\Db\Service\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\Db\Table\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'VuFind\DigitalContent\OverdriveConnector' => 'VuFind\DigitalContent\OverdriveConnectorFactory',
'VuFind\DoiLinker\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
Expand Down Expand Up @@ -464,6 +468,7 @@
'VuFind\ServiceManager\ServiceInitializer',
],
'aliases' => [
'doctrine.connection.orm_vufind' => 'VuFind\Db\Connection',
'League\CommonMark\MarkdownConverterInterface' => 'League\CommonMark\ConverterInterface',
'Request' => 'VuFind\Http\PhpEnvironment\Request',
'VuFind\AccountCapabilities' => 'VuFind\Config\AccountCapabilities',
Expand Down Expand Up @@ -533,6 +538,41 @@
'VuFind\Form\Form' => false,
],
],
'doctrine' => [
'cache' => [
'filesystem' => [
'directory' => LOCAL_CACHE_DIR . '/doctrine',
],
],
'configuration' => [
'orm_default' => [
'query_cache' => 'filesystem',
'result_cache' => 'filesystem',
'metadata_cache' => 'filesystem',
'hydration_cache' => 'filesystem',
],
],
'driver' => [
'vufind_annotation_driver' => [
'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
'cache' => 'filesystem',
'paths' => [
'module/VuFind/src/VuFind/Db/Entity',
],
],
'orm_default' => [
'drivers' => [
'VuFind\Db\Entity' => 'vufind_annotation_driver',
],
],
],
'entitymanager' => [
'orm_vufind' => [
'connection' => 'orm_vufind',
'configuration' => 'orm_vufind',
],
],
],
'translator' => [],
'translator_plugins' => [
'factories' => [
Expand Down Expand Up @@ -595,7 +635,9 @@
'content_toc' => [ /* see VuFind\Content\TOC\PluginManager for defaults */ ],
'contentblock' => [ /* see VuFind\ContentBlock\PluginManager for defaults */ ],
'cover_layer' => [ /* see VuFind\Cover\Layer\PluginManager for defaults */ ],
'db_entity' => [ /* see VuFind\Db\Entity\PluginManager for defaults */ ],
'db_row' => [ /* see VuFind\Db\Row\PluginManager for defaults */ ],
'db_service' => [ /* see VuFind\Db\Service\PluginManager for defaults */ ],
'db_table' => [ /* see VuFind\Db\Table\PluginManager for defaults */ ],
'doilinker' => [ /* see VuFind\DoiLinker\PluginManager for defaults */ ],
'form_handler' => [ /* see VuFind\Form\Handler\PluginManager for defaults */],
Expand Down
13 changes: 13 additions & 0 deletions module/VuFind/src/VuFind/Controller/AbstractBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,19 @@ public function getTable($table)
->get($table);
}

/**
* Get a database service object.
*
* @param string $name Name of service to retrieve
*
* @return \VuFind\Db\Service\AbstractService
*/
public function getDbService(string $name): \VuFind\Db\Service\AbstractService
{
return $this->serviceLocator->get(\VuFind\Db\Service\PluginManager::class)
->get($name);
}

/**
* Get the full URL to one of VuFind's routes.
*
Expand Down
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/Controller/UpgradeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ public function fixdatabaseAction()
// content -- the checks below should be platform-independent.

// Check for legacy tag bugs:
$resourceTagsTable = $this->getTable('ResourceTags');
$anonymousTags = $resourceTagsTable->getAnonymousCount();
$tagService = $this->getDbService(\VuFind\Db\Service\TagService::class);
$anonymousTags = $tagService->getAnonymousCount();
if ($anonymousTags > 0 && !isset($this->cookie->skipAnonymousTags)) {
$this->getRequest()->getQuery()->set('anonymousCnt', $anonymousTags);
return $this->redirect()->toRoute('upgrade-fixanonymoustags');
Expand Down
Loading