Commit graph

9 commits

Author SHA1 Message Date
Chuck Adams
d9db849e11
Convert Resource Request/Response classes to Bag (#225)
* refactor: use Bag transformers for (Plugin|Theme)HotTagsResponse

* refactor: replace more static constructors with Transforms

* zap: rm unused ThemeUpdateCheckTranslationCollection (whew) VO

* refactor: inline ThemeUpdateData::fromModelCollection

* refactor: embaggify QueryPluginsRequest

* refactor: Bag up PluginInformationRequest

* refactor: throw PluginUpdateRequest into the Bag

* test: move phpstan.neon -> phpstan.dist.neon

* refactor: tighten up update check request types

* test: use more realistic plugin filenames in update check tests

* refactor: use single query for plugin update check

* refactor: convert plugin updates to Bag (i'm out of "bag" neologisms)

* refactor: use ThemeResponse VO for theme info requests

* refactor: commit baggravated assault on ThemeCollection/ThemeResource ;)

* refactor: bag up the rest of the Resource types

* tweak: slipstream in dependabot upgrade
2025-04-02 20:40:32 -06:00
Chuck Adams
123803ec83
update plugin_information, implement hot_tags for /plugins/info (#87)
* fix: mv grumphp.yml grumphp.yml.dist and use explicit phpcsfixer config

* refactor: move NotFoundException to App\Exceptions

* refactor: move plugin services to App\Services\Plugins

* feat: implement hot_tags action for /plugins/info endpoint

* fix: make plugin_information fields match upstream (order still differs)

* fix: give nullable columns in Plugin nullable types

* fix(tests): rm 'downloaded' key from assertWpPluginAPIStructure

* refactor: break out QueryPluginsService from PluginInformationService

* refactor: break queryPlugins into apply* methods

* fix: change orderBy to reorder in applyBrowse()

* feat: add slug to plugin search criteria

* fix: variable naming in Plugin::fillFromMetadata

* fix: use tags table for tag query

* feat: add PluginTagFactory (not used yet)

* feat: implement /core/importers

* fix: tags fields removed and refactor plugin tests (#89)

- On #87, a many-to-many relationship for tags was introduced; keeping the tags field on the Plugin table is unnecessary
- Refactor the Plugin tests to use the new many-to-many relationshipt
- Refactor the PluginFactory to allow create plugins with the tags relationship

* style: make fix

* style: take out some redundant ::query() calls

* fix: add cascade delete to tag join tables

---------

Co-authored-by: Enrique Chavez <noone@tmeister.net>
2024-11-02 17:42:15 -06:00
Chuck Adams
4fd07ea9b1
New Plugins and Themes tables built from AspireSync data (#65)
* chore: rename sync tables to use sync_ prefix

* feat: migration for new plugins table

* chore: create themes table migration

* refactor: move sync models to new names and subdir

* refactor: move Plugin and Theme models to App\Models\WpOrg

* feat: use parallel tasks in php-cs-fixer

* format: keep attributes on their own lines

* fix: use sync_themes for stub search
2024-10-26 14:07:26 -06:00
Chuck Adams
c19c1c0f8b
use php-cs-fixer for formatting (#29)
* fix(build): rm key:generate in check-env target

The docker container is guaranteed to not be running at this point.  keygen happens last in the process.

* qa: switch from pint to php-cs-fixer

* ci: use make in run-checks action

* ci: run checks directly on the gh runner instance

* ci: use shivammathur/setup-php@v2

* style: run make fix

* ci: add unit tests to run-checks action
2024-10-19 09:42:52 -06:00
Sarah Savage
5e6f473d4d
Merging Laravel into main (#27)
* refactor: wipe out mezzio installation prior to installing Laravel

* refactor: install laravel

* fix: push attic'd composer.json that didn't make it into commit

* Adding several improvements (#23)

* Added improvements around Phinx and migrations
* Created Franken as our main PHP source
* Rewrote the Makefile to use the CLI and work properly

* build: regenerate lockfile

* fix(build): move migrations to require-dev so laravel doesnt choke on it

* feat: add mailhog service

* chore: tweak sample config

* fix: port make targets around db and migrations

* temp: add phinx migrations to attic

* fix: fix make list target formatting

* chore: port initial schema migration

* chore: roll in remaining migrations

* chore: publish cors config

* temp: rm the rest of .ATTIC

* Minor changes to provide correct settings for dev enviornment (#24)

* Removed the .env file from the Docker configuration so its read
locally and changes to it are immediately reflected.
* Updated the DB name in the Docker configuration

* fix: add correct DB environment vars to .env.example

* fix: api.aspirepress.local -> api.aspirecloud.local in docker-compose.yml

* feat: add generate-key target to Makefile

* feat: add stub api routes file

* Adding quality tools and fixing coding style

* Added Pint for CS fixing
* Added Larastan for code quality and set Level 6 with a baseline
* Fixed minor style issues

* Updating running checks to build the CLI container and then the Makefile with Pest

* Fixing a style issue detected

* Generating app key for tests

Note that eventually we'll have to pass a host of config vars to
effectively test the Laravel instance. That's TBD for later.

* Add Catch All handler (#25)

* fix: rm catchall route in api.php

* style: fix style to make pint happy

* Populating the .env file if it doesn't exist

* fix: give phpstan proper args in check target

* fix: phpstan qa issues

---------

Co-authored-by: Chuck Adams <cja987@gmail.com>
Co-authored-by: Matthew Zalewski <matthew@minion.co.nz>
2024-10-19 07:32:17 -06:00
Chuck Adams
6c6961ae9b chore: add .env to .gitignore 2024-10-12 20:35:44 -06:00
Sarah Savage
291918e6c4 Excluding SQL files so we can have dumps present 2024-10-12 05:28:41 -04:00
Sarah Savage
dd4e118b48 Updating skeleton to reflect more modern dependencies/methodologies. 2023-05-06 09:07:35 -04:00
Brandon Savage
63686360bc
Initial commit. 2022-11-22 15:19:13 -05:00