Skip to content

Releases: ajthinking/archetype

v1.0.0

09 Jan 17:08
5d238b8
Compare
Choose a tag to compare

Welcome to v1.0.0 💚

AstQueryBuilder

  • Adds ability to enter Node class and properties in one go:
$astQuery->classMethod('name->name')
  • Adds HigherOrderWhere which is a short syntax for where callbacks:
$this->file->astQuery()
    ->class()
    ->property()
    ->where->propertyProperty('name->name')->is($key)->get()
    ->replace(function() {
        ...
    };
  • Auto resolving where clauses allows for leaving a where clause without get(). Results are evaluated to see if they have results (considered thruty) or empty (falsy).
  • Adds Dumpable proxies on astQueryBuilder for ->dd->something() and ->dump->another
  • Adds missing PhpParser types in class map
  • Remove option to use _-postfixed node types in class map
  • Adds an opt-in visualizer/debug tool, see: #45
  • Numerous bugfixes

Endpoints

  • Improved ClassConst

Misc

  • fromString can allow pseudo php
PHPFile::addMissingTags()->fromString('$hey = 1337')
  • Allow reading files outside of the input root using an absolute path
  • Add Tappable and Dumpable traits

Discontinued features ⚠️ 💀

In order to tighten this package up and consolidate around primary features, we will drop the following incomplete/broken functionality:

  • Schema
  • Project
  • Generators
  • Trait endpoint (planned to be revived in a better form)

Furthermore,

  • Remove aliases for PHPFile and LaravelFile to enforce explicit facade usage
  • Remove doctrine/dbal dependency

Internal changes

  • All tests are moved to pest 🚀
  • Introduce TestablePHPFile facade.
  • Introduce TestableAstQueryBuilder facade.

Missing and broken

  • The docs are still not near as good as they should be.
  • Some formatting bugs persist. It is most likely related to format preserving pretty printing. See incomplete test

v1.0.0 Prerelease

01 Jan 14:23
Compare
Choose a tag to compare
v1.0.0 Prerelease Pre-release
Pre-release

Whats new?

  • Adds remove() ability for class constants.

Discontinued features

In order to tighten this package up and consolidate around primary features, we will drop the following:

  • Schema
  • Project
  • Generators

Most of these feature were incomplete or otherwise broken. A side effect of this is we will no longer be depending on doctrine/dbal.

Tests

All tests are moved to pest and many uses an internal TestablePHPFile facade.

v0.2.8

20 Nov 12:40
492838a
Compare
Choose a tag to compare

Better array formatting 🎉 🎉 🎉
Works for newly created, loaded or modified code.

class Finally
{
    protected $empty = [];
    
    protected $one = [
        'one',
    ];
    
    protected $moreThanOne = [
        'one',
        'two',
    ];
}

Thanks for spotting this @jackmcdade

Bump dependencies

16 Nov 20:03
bed77b3
Compare
Choose a tag to compare

Fixes an issue with doctrine/dbal

NotInOperator bugfix and fresh dependencies.

30 Oct 07:59
da7f2bc
Compare
Choose a tag to compare

🐛 Fix bug in notInOperator by @ordago
🔒 Allow doctrine/dbal ^2.10 by @WorldSeso7
✅ Bump dependecies, typos and test updates

Dependency bugfix

16 Jul 18:09
684dabf
Compare
Choose a tag to compare

Include nikic/php-parser as a dependency, don't assume it is included elsewhere.

Refactor and bugfixes

13 Feb 19:06
b05f2bf
Compare
Choose a tag to compare
Merge pull request #19 from nathane/add-stubs-directory

Add default stubs directory

Autoload Bugfix

02 Dec 16:48
Compare
Choose a tag to compare

Rename mismatching class name/file name. Fixes #15

Support class constant get/set

31 Oct 15:03
2816f37
Compare
Choose a tag to compare

Support for class constant

$file->classConstant('HOME')

Thanks to @seryak

Laravel 8 Support

30 Sep 08:07
Compare
Choose a tag to compare

v0.2.1 🚀

  • Tests on Laravel 8
  • Format preserving code manipulation
  • Ignores abstract models