Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
90c11ab
updated sync command
bryce13950 Apr 7, 2025
b8f8c1b
updated message mailer
bryce13950 Apr 7, 2025
3605aec
updated service test
bryce13950 Apr 7, 2025
2bb1154
added new tests
bryce13950 Apr 7, 2025
075b14f
added initial statistic module
bryce13950 Apr 30, 2025
ec41531
added initial statistic tests
bryce13950 Apr 30, 2025
b1ac5eb
added more field
bryce13950 Apr 30, 2025
29ceee5
reworked user statistic to target statistic
bryce13950 Apr 30, 2025
4430960
added statistic contract
bryce13950 Apr 30, 2025
54181e1
made collection capable of being connected to statistics
bryce13950 Apr 30, 2025
d9431a1
added service for getting related models to a statistic
bryce13950 May 1, 2025
4a3f4fa
added service for synchronizing stats
bryce13950 May 1, 2025
5a03ef2
setup counting service for stats
bryce13950 May 1, 2025
b86217d
generalized relationship walking
bryce13950 May 1, 2025
52ebd77
created new observer for aggregated data
bryce13950 May 1, 2025
08ec61e
added tests
bryce13950 May 1, 2025
dae5078
set correct contracts
bryce13950 May 1, 2025
87250bf
registered new bits
bryce13950 May 1, 2025
df9603b
remvoed audio clip mention
bryce13950 May 1, 2025
e9cbaeb
made some fixes
bryce13950 May 2, 2025
6838336
added doc comment
bryce13950 May 2, 2025
2b6bf88
fixed some issues with the statistics controller
bryce13950 May 2, 2025
634ce0a
created needed roles
bryce13950 May 2, 2025
657f2dc
updated validation rules
bryce13950 May 2, 2025
a742e30
updated role setting
bryce13950 May 2, 2025
f049f11
fixed import
bryce13950 May 2, 2025
96a05a1
resolved some import issues
bryce13950 May 2, 2025
d712c86
moved statistic policy
bryce13950 May 2, 2025
b3add44
fixed import
bryce13950 May 2, 2025
9c3f5fc
fixed comment
bryce13950 May 2, 2025
4ec4417
set properly formated controller
bryce13950 May 2, 2025
a22e289
corrected import
bryce13950 May 2, 2025
0448dd0
added field again
bryce13950 May 2, 2025
13cb3a6
removed extra constructor
bryce13950 May 2, 2025
52633eb
fixed route
bryce13950 May 2, 2025
319435e
fixed route
bryce13950 May 2, 2025
4693324
fixed path
bryce13950 May 2, 2025
ee4b752
fixed repo
bryce13950 May 2, 2025
796fd4a
fixed import
bryce13950 May 2, 2025
5f519e0
registered route
bryce13950 May 2, 2025
a825650
updated controller structure
bryce13950 May 3, 2025
6b38d8a
set correct structure
bryce13950 May 3, 2025
3fd60a5
fixed some tests
bryce13950 May 3, 2025
067aa75
fixed some statistic request items
bryce13950 May 3, 2025
758fe52
fixed import
bryce13950 May 3, 2025
09af736
imported events
bryce13950 May 3, 2025
66b7fd7
fixed import
bryce13950 May 3, 2025
bc2170f
improved observer
bryce13950 May 3, 2025
fa67f4b
registered services
bryce13950 May 3, 2025
e386827
fixed some data items
bryce13950 May 3, 2025
aeeff2a
fixed some tests
bryce13950 May 3, 2025
8ef2d5c
passed some tests
bryce13950 May 4, 2025
d08ad8a
added more tests
bryce13950 May 4, 2025
489d320
added recount job for when statistics change
bryce13950 May 4, 2025
577da49
updated the way update works
bryce13950 May 4, 2025
6826e10
fixed use
bryce13950 May 4, 2025
0d64906
fixed namespace
bryce13950 May 4, 2025
9242839
removed log
bryce13950 May 4, 2025
1be54dc
fixed more issues
bryce13950 May 4, 2025
2067221
removed log points
bryce13950 May 4, 2025
dda21ad
fixed some test errors
bryce13950 May 4, 2025
890e454
removed extra rule
bryce13950 May 4, 2025
bf3e44c
imported statistic filter epository
bryce13950 May 4, 2025
894cc30
fixed not present test
bryce13950 May 4, 2025
d0d1b3e
added proper events
bryce13950 May 4, 2025
ac652bf
fixed some things with a repo
bryce13950 May 4, 2025
6b15ddf
fixed some test items
bryce13950 May 4, 2025
80d931d
registered repo properly
bryce13950 May 4, 2025
98ac1ac
removed extra variable
bryce13950 May 4, 2025
b68d437
fixed injections
bryce13950 May 4, 2025
b4f5a82
used trait
bryce13950 May 4, 2025
cd38204
fixed import
bryce13950 May 4, 2025
b5d174d
fixed some more issues
bryce13950 May 4, 2025
1247633
fixed some more tests
bryce13950 May 4, 2025
72403d4
fixed test
bryce13950 May 4, 2025
23677c0
fixed some tests
bryce13950 May 4, 2025
235db16
fixed repo
bryce13950 May 4, 2025
e249ec4
updated test
bryce13950 May 4, 2025
e5df12a
updated test
bryce13950 May 4, 2025
d00d462
fixed test
bryce13950 May 4, 2025
c1b41cb
fixd some tests
bryce13950 May 4, 2025
c6455db
fixed last tests
bryce13950 May 4, 2025
bbf861c
updated function to return array of paths instead of single path
bryce13950 May 4, 2025
7fe08f2
fixed some imports
bryce13950 May 4, 2025
998ba4c
added proper aggreated model observer
bryce13950 May 4, 2025
f7c19a3
updated tst
bryce13950 May 4, 2025
bcfb935
updated model name
bryce13950 May 4, 2025
b698bdc
removed extra service
bryce13950 May 4, 2025
819f8e3
removed some extra calls
bryce13950 May 5, 2025
6337a66
updated statistic events to use getters
bryce13950 May 5, 2025
244de8e
removed mock from test
bryce13950 May 5, 2025
459ae17
removed fqdn
bryce13950 May 5, 2025
b678243
removed getter
bryce13950 May 5, 2025
387ee1a
removed mocks
bryce13950 May 5, 2025
62e7c9c
registered service
bryce13950 May 5, 2025
7915e41
updated registration
bryce13950 May 5, 2025
3d51d4c
changed return type
bryce13950 May 5, 2025
2869bb1
filled in delete listener
bryce13950 May 5, 2025
d4ffac2
registered delete event
bryce13950 May 5, 2025
88de256
added modern creator
bryce13950 May 5, 2025
d624612
made trait more specific
bryce13950 May 6, 2025
5b6e6a3
removed optional user
bryce13950 May 7, 2025
b2a6df8
alphabetized providers
bryce13950 May 7, 2025
6cf1127
fixed test names
bryce13950 May 7, 2025
bf23717
used parent function for related data
bryce13950 May 7, 2025
de79f52
revisted target statistic test
bryce13950 May 8, 2025
efd9939
removed mocked model
bryce13950 May 8, 2025
f10e9ed
fixed stripe services
bryce13950 May 8, 2025
8b351de
fixed dependencies
bryce13950 May 8, 2025
7b474d9
fixed params
bryce13950 May 8, 2025
38ecacb
resolved some more tests
bryce13950 May 8, 2025
735ef30
removed event dispatcher from target statistics
bryce13950 May 8, 2025
f36c738
fixed repo injection
bryce13950 May 8, 2025
2613cfd
Updated injection
bryce13950 May 8, 2025
92a3eb4
registered remaining items
bryce13950 May 8, 2025
c10959e
fixed import
bryce13950 May 9, 2025
85d42c9
fixed provider
bryce13950 May 9, 2025
a2c5fae
removed extra field from target statistic
bryce13950 May 9, 2025
8485dc5
added test for deep nesting
bryce13950 May 9, 2025
37e883e
checked for existing statistics when syncing
bryce13950 May 9, 2025
a082f60
updated constructor
bryce13950 May 9, 2025
830a5ec
added more robust test
bryce13950 May 9, 2025
92a5327
removed extra tests
bryce13950 May 9, 2025
4d24e4e
removed extra function
bryce13950 May 10, 2025
628106c
improved collection model
bryce13950 May 10, 2025
df5f4e7
removed extra test
bryce13950 May 10, 2025
56ddc1e
added model tests
bryce13950 May 10, 2025
5819643
removed extra stuff
bryce13950 May 10, 2025
44144ef
removed extra constants and added casts back
bryce13950 May 10, 2025
17d5dd4
moved event registration to the right place
bryce13950 May 10, 2025
f0c2a04
reverted test
bryce13950 May 10, 2025
ddf7a3a
fixed import
bryce13950 May 10, 2025
07156d8
Merge pull request #58 from ProjectAthenia/lignwave-sync
bryce13950 May 10, 2025
a9effd2
created update script
bryce13950 May 10, 2025
dff9e4c
excluded upgrade files
bryce13950 May 10, 2025
5a5a947
Merge pull request #59 from ProjectAthenia/feature-update-script
bryce13950 May 10, 2025
79bda16
updated mode
bryce13950 May 10, 2025
9093aee
added 4.0 upgrade guide
bryce13950 May 10, 2025
ac794b3
added remaining upgrade guide
bryce13950 May 10, 2025
e40d2d3
improeved update script
bryce13950 May 10, 2025
9f4a21b
updated upgrade script
bryce13950 May 10, 2025
9a99d7b
removed reference
bryce13950 May 10, 2025
210519d
removed reference
bryce13950 May 10, 2025
6ac2819
registered child validators
bryce13950 May 11, 2025
f437592
fixed comment
bryce13950 May 13, 2025
ade4235
Revert "fixed comment"
bryce13950 May 13, 2025
f9be78c
registered event service provider
bryce13950 May 13, 2025
b12de8c
fixed import
bryce13950 May 13, 2025
b90501f
fixed observer
bryce13950 May 13, 2025
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
213 changes: 213 additions & 0 deletions UPGRADE-3.x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Athenia App Upgrade Guide

To upgrade from previous version of Athenia please check each version number listed below step by step. With every update make sure to run `php artisan ide-helper:models --smart-reset`

The fastest way to upgrade is to run the following commands from your repos root

* cp $ATHENIA_REPO/docker-compose.yml ./
* cp $ATHENIA_REPO/dev_login.sh ./
* cp $ATHENIA_REPO/.env.example ./
* rsync -arv $ATHENIA_REPO/dockerfiles ./
* rsync -arv $ATHENIA_REPO/extras ./
* rsync -arv $ATHENIA_REPO/code ./ --exclude vendor --exclude storage --exclude '.env' --exclude code/app/Providers

After that, you always want to make sure you inspect all changes, and you still want to go through the change log to check for moved files and deleted files, as rsync cannot check for deleted files, since it would delete any files created for the child application.

# 3.5.0

This version rearranges all requests to make sure they are easy to modify going forward. After rsync is ran, make sure to inspect all request changes to identify any customizations previously made. All of those customizations should now be put into the new Requests structure in app/Http/Core/Requests, as opposed to app/Athenia/Http/Core/Requests. The request code/app/Athenia/Http/Core/Requests/MembershipPlan/RetrieveRequest.php and code/app/Athenia/Http/Core/Requests/Organization/RetrieveRequest.php should both be deleted after rsync as those have been renamed to `ViewRequest`.

This version also updates the file `code/app/Athenia/Mail/MessageMailer.php` to take in from information out of config.

This version also fixes a deprecation warning from a recent PHPUnit update. This again will be resolved mostly by syncing the code directory.

# 3.4.0

This update adds some miscellaneous changes as well as updating the environment to php 8.4. It also updates the dependencies to use laravel 11, which has resulted in the generators package to be removed from the base service provider. After updating the Athenia files above, make sure to update the following files.

* code/app/Models/User/User.php - Removed Swagger docs
* code/composer.json - Updates dependencies, make sure to inspect

# 3.3.0

Nice little one again! For this one you only need to copy over `dev_login.sh` and `docker-compose.yml`. This update will allow you to now run all background jobs for the app by booting the docker compose with `docker compose --profile background up`. Running the docker compose normally will keep those pieces turned off.

# 3.2.0

This update includes a number of changes. It opens up the features endpoints to be available to all users, adds an endpoint for messages, adds some meta information to assets, and finally adds some new helpers for dealing with various files.

To start, copy over the Athena app and tests module. The files changed in those modules are as follows...

* code/app/Athenia/Console/Commands/ReindexResources.php
* code/app/Athenia/Contracts/Services/ArchiveHelperServiceContract.php
* code/app/Athenia/Contracts/Services/Asset/AssetConfigurationServiceContract.php
* code/app/Athenia/Contracts/Services/Asset/AssetImportServiceContract.php - Renamed from code/app/Athenia/Contracts/Services/AssetImportServiceContract.php
* code/app/Athenia/Contracts/Services/Indexing/ResourceRepositoryServiceContract.php
* code/app/Athenia/Exceptions/Handler.php
* code/app/Athenia/Http/Core/Controllers/MessageControllerAbstract.php
* code/app/Athenia/Http/Core/Requests/Feature/IndexRequest.php
* code/app/Athenia/Http/Core/Requests/Feature/ViewRequest.php
* code/app/Athenia/Http/Core/Requests/Message/StoreRequest.php
* code/app/Athenia/Jobs/CalculateAssetDimensionsJob.php
* code/app/Athenia/Providers/BaseRepositoryProvider.php
* code/app/Athenia/Providers/BaseServiceProvider.php
* code/app/Athenia/Repositories/AssetRepository.php
* code/app/Athenia/Repositories/BaseRepositoryAbstract.php
* code/app/Athenia/Repositories/User/ProfileImageRepository.php
* code/app/Athenia/Services/ArchiveHelperService.php
* code/app/Athenia/Services/Asset/AssetConfigurationService.php
* code/app/Athenia/Services/AssetImportService.php - Renamed from code/app/Athenia/Services/Asset/AssetImportService.php
* code/app/Athenia/Services/Indexing/BaseResourceRepositoryService.php

* code/tests/Athenia/Feature/Http/Feature/FeatureIndexTest.php
* code/tests/Athenia/Feature/Http/Feature/FeatureViewTest.php
* code/tests/Athenia/Feature/Http/Message/MessageCreateTest.php
* code/tests/Athenia/Feature/Http/Organization/Collection/OrganizationCollectionCreateTest.php
* code/tests/Athenia/Feature/Http/User/Thread/Message/UserThreadMessageCreateTest.php
* code/tests/Athenia/Integration/Console/Commands/ReindexResourcesTest.php
* code/tests/Athenia/Integration/Policies/Collection/CollectionItemPolicyTest.php
* code/tests/Athenia/Integration/Policies/Collection/CollectionPolicyTest.php
* code/tests/Athenia/Integration/Policies/FeaturePolicyTest.php
* code/tests/Athenia/Integration/Repositories/AssetRepositoryTest.php
* code/tests/Athenia/Integration/Repositories/Collection/CollectionRepositoryTest.php
* code/tests/Athenia/Integration/Repositories/User/ProfileImageRepositoryTest.php
* code/tests/Athenia/Unit/Console/Commands/AuditAssetDimensionsCommandTest.php
* code/tests/Athenia/Unit/Exceptions/HandlerTest.php
* code/tests/Athenia/Unit/Models/CategoryTest.php
* code/tests/Athenia/Unit/Services/ArchiveHelperServiceTest.php
* code/tests/Athenia/Unit/Services/Asset/AssetConfigurationServiceTest.php
* code/tests/Athenia/Unit/Services/Asset/AssetImportServiceTest.php
* code/tests/Athenia/Unit/Services/Indexing/BaseResourceRepositoryServiceTest.php

Then update the following files that live outside of the main Athenia modules

* code/app/Http/V1/Controllers/MessageController.php - New Controller
* code/app/Models/Category.php - Removed default order
* code/app/Models/Messaging/Message.php - Updated validation rules for general endpoint
* code/app/Policies/FeaturePolicy.php - Relaxed Policy
* code/app/Services/.gitkeep - Added to make sure directory is kept
* code/app/Services/Indexing/ResourceRepositoryService.php - Complete reworked
* code/composer.json - Added zip extension
* code/config/services.php - Added Slack config
* code/database/migrations/2024_06_20_005446_add_meta_to_assets.php - New migration for meta data
* code/routes/core.php - Moved features endpoint and added messages endpoint
* dev_login.sh - Made identification more accurate

# 3.1.0


Little breather after the big boy this one re-adds the scaffolding needed to run the app via a web layer. The only files within the app that needs to be updated is `code/app/Http/Kernel.php`, and `code/bootstrap/app.php`. The `code/app/Athenia` module should also be copied over.

# 3.0.0

This is a massive update. The vast majority of the code for both the main app and the tests have been moved into new namespaces in preparation to move all the templated code into its own package. Along with that, vagrant has been replaced with docker along with a new set of github actions. The entire messaging apparatus has also been reworked.

## Environment Changes

To start remove the following paths

* Vagrantfile
* ansible
* upgrade.json
* vagrant-do-provision.sh

Then copy over the following new paths

* .env.example
* .github/
* .gitignore
* dev_login.sh
* docker-compose.yml
* dockerfiles/

You then need to finish the following tasks.

## Athenia Restructure

There are new testing and app namespaces setup. The easiest way to make this change is to remove all of the listed files, and copy over `code/app/Athenia`, and `code/tests/Athenia`. Take special care to check any customizations made to any files in these directories to make sure that you leave your customized files in place.

Removed paths. Make sure to check any remaining files outside the scope of Athenia when directories were removed. Also, make sure that none of these files have customizations.

* code/app/Console/Commands/ReindexResources.php
* code/app/Console/Commands/ResendMessageCommand.php
* code/app/Contracts/ - Services & Repositories remain empty
* code/app/Events/
* code/app/Exceptions/
* code/app/Http/Core/ - Controllers & Requests remain empty
* code/app/Http/Middleware/
* code/app/Jobs/CanDisplayOutputAbstractJob.php - Only file that was in the directory from Athenia
* code/app/Listeners/Article/ArticleVersionCreatedListener.php - Only file that was in the directory from Athenia
* code/app/Listeners/Message/ - This directory was moved to Athenia, and it has also been renamed to Messaging
* code/app/Listeners/Payment/DefaultPaymentMethodSetListener.php - Only file that was in the directory from Athenia
* code/app/Listeners/User/ForgotPasswordListener.php - Only file removed from the root directory
* code/app/Listeners/User/UserMerge/
* code/app/Mail/
* code/app/Models/BaseModelAbstract.php
* code/app/Models/Traits/
* code/app/Observers/
* code/app/Policies/BaseBelongsToOrganizationPolicyAbstract.php
* code/app/Policies/BasePolicyAbstract.php
* code/app/Providers/AtheniaRepositoryProvider.php
* code/app/Repositories/
* code/app/Services/
* code/app/ThreadSecurity/
* code/app/Traits/CanGetAndUnset.php - Only file that was in the directory from Athenia
* code/app/Validators/

After that, the following paths have changes. Anything that has not been specifically mentioned within app should still be looked at to see if imports have been changed.

* code/phpunit.xml - Added new test suites for Athenia stuff that runs first.
* code/app/Console/Kernel.php - This file has been completely reworked.
* code/app/Listeners/User/Contact/ContactCreatedListener.php - Subject changed
* code/app/Policies/ - Make sure to take special note while inspecting these files as the contact `IsAnEntity` was moved and then renamed to `IsAnEntityContract`
* code/bootstrap/app.php - The namespace for the Exception Handler was updated

Finally, the following directories now have a gitkeep to make sure the structure for the app stays in place

* code/app/Contracts/
* code/app/Contracts/Repositories/
* code/app/Contracts/Services/
* code/app/Events/
* code/app/Http/Core/Controllers/
* code/app/Http/Core/Requests/
* code/app/Observers/
* code/app/Repositories/
* code/app/Services/
* code/tests/Feature/
* code/tests/Integration/
* code/tests/Unit/

Once all of the changes have been applied, check all remaining paths in both tests and app to make sure any namespaces are updated.

## Messaging Restructure

* code/.env.example
* code/app/Models/Organization/Organization.php - Large rework, best to review
* code/app/Models/User/User.php
* code/config/athenia.php
* code/config/services.php
* code/database/factories/Messaging/ - New
* code/database/factories/User/MessageFactory.php - Removed
* code/database/factories/User/ThreadFactory.php - Removed
* code/database/migrations/2024_04_16_142402_expand_messages_relations.php
* code/tests/Unit/Listeners/Message/MessageCreatedListenerTest.php
* extras/

## Providers Restructure

* code/app/Providers/AppRepositoryProvider.php
* code/app/Providers/AppServiceProvider.php
* code/app/Providers/AppValidatorProvider.php
* code/app/Providers/AuthServiceProvider.php
* code/app/Providers/EventServiceProvider.php
* code/app/Providers/RouteServiceProvider.php

## Laravel Update

Along with this update, Laravel has been updated to 10.x. So much has been updated in the whole code base, that documenting the changes for composer is a bit difficult. To complete this update, check the changes to the composer.json within Athenia, then check any dependencies specific to your project, and finally inspect any custom code for your app to see if there are any differences.

After that, the validation strings at `code/resources/lang/en/validation.php` has been moved to `code/lang/en/`

## Last Notes

Now that all of this is done, it is best to check the .env.example to see any changes, and update your env for those changes.
Loading