Download the PHP package illusiard/yii2-base-entity-system without Composer

On this page you can find all versions of the php package illusiard/yii2-base-entity-system. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-base-entity-system

yii2-base-entity-system

illusiard/yii2-base-entity-system (BES) - meta-driven CRUDL/search/schema слой для Yii2 с reference SPA и локальным dev host для проверки живого API.

Состав Репозитория

Ключевые backend-слои:

Backend API

Dev host по умолчанию использует prefix:

Entity Endpoints

delete использует model-level semantics: для моделей с activity field is_active выполняется soft delete, для моделей без activity field остается hard delete. restore восстанавливает soft-deleted запись. permanentDelete и alias permanent-delete удаляют запись физически.

List/Search Query

GET /{entity}/list поддерживает:

По умолчанию soft-deleted записи скрыты, если у модели есть activity field. Для сущностей без activity field параметр deleted не навязывает искусственный фильтр.

Body И Headers

create и update принимают JSON body с полями модели:

Для JSON requests используйте Content-Type: application/json. Dev host не требует отдельного auth header и работает с permissive ACL; в production-приложении authentication/authorization остаются ответственностью host app и ACL policy.

Пагинация list response передается через headers:

Для browser clients dev host также выставляет CORS headers и expose headers для pagination.

Wire Format

Успешные ответы intentionally small:

actions возвращает compact ACL manifest:

Formatted entity rows/items включают business fields, refs и acl. refs используются frontend runtime для relation labels:

acl содержит compact bit mask операций:

Operation Bit
list 1
read 2
create 4
update 8
delete 16
restore 32
permanentDelete 64

Dev host permissive ACL обычно возвращает 127 для полной маски.

Error Format

Ошибки нормализуются в envelope:

Типичные типы:

Meta/UI Contract

BES использует typed DTO для meta и UI contract:

Meta, ActiveRecord model, DB schema и relation getters должны быть согласованы. Нельзя объявлять writable поле, которое модель не принимает через load(), или relation в meta без рабочего AR relation getter.

Текущий snapshot всех зарегистрированных meta/UI структур хранится в:

Его можно обновить через dev host helper:

Snapshot read-only: он не генерирует и не меняет runtime meta.

Soft Delete

Foundation-level semantics:

Mass operations вроде deleteAll() этим foundation-слоем автоматически не перехватываются.

Event Facade

BES содержит централизованный EventHub, доступный через BaseEntitySystem::getEventHub().

Основной API:

Поддерживаемые BES events:

MEL events также прокидываются через этот facade, чтобы клиенты могли подписываться через одну точку. Soft delete/restore/permanentDelete не имеют отдельной скрытой event-магии: события активности и состояния срабатывают через существующий afterSave/behavior path.

Schema API

Schema endpoints:

Read endpoints доступны для introspection. table/{name} принимает только имена с символами a-zA-Z0-9_.-.

diff и migration принимают JSON body с обязательным объектом desired в формате schema DTO из illusiard/dbtoolkit:

Для migration options также поддерживается flat form на root-level: className, namespace, transactional, useTablePrefix. diff возвращает {"actions": [...]}, migration возвращает {"className": "...", "code": "..."}. Write tooling (diff, migration) должен включаться явно через controlled module config, например allowSchemaWriteTools, и не предназначен для открытой production-среды.

Dev Host

dev/host/ - локальный integration host. Он нужен для ручной проверки, live API integration tests и browser E2E.

Особенности:

Запуск из корня репозитория:

Live API base URL:

Smoke-check dev host:

Dev host stateful. Если нужно начать с чистого состояния, удалите SQLite/cache runtime файлы в dev/host/runtime/ и запустите host снова.

Frontend SPA

view/ - reference SPA для проверки backend protocol в реальном runtime. Runtime architecture сохраняет направление:

Providers:

Запуск mock provider:

Запуск live API provider:

Во frontend refs и ACL bit masks нормализуются через EntityFormatter/runtime provider path. listFields, popup stack и related popup flows закреплены в runtime. Нестандартные scenario/debug controls остаются dev/test harness и не являются частью production UI contract.

Tests

Backend unit/integration tests:

Dev host HTTP smoke:

Frontend Vitest mock/integration suite:

Эта suite включает provider/runtime contract tests, включая view/src/integration/__tests__/api-provider.integration.test.js, и работает без backend через mock/stub providers.

Live API integration tests against running dev host:

test:live использует:

Основной live integration файл: view/src/integration/__tests__/live-api.integration.test.js. Dev host должен быть уже поднят на http://127.0.0.1:8081/api/v1.

Browser E2E через Playwright:

Только live API E2E сценарии:

Playwright config поднимает dev host и Vite frontend с live API provider. По умолчанию Chromium-compatible browser ожидается как:

Если Chrome установлен в другом месте, настройте environment для Playwright, например PLAYWRIGHT_CHROMIUM_EXECUTABLE. Base URLs также можно переопределять через PLAYWRIGHT_FRONTEND_BASE_URL и PLAYWRIGHT_BACKEND_BASE_URL.

Current Coverage

Backend tests закрепляют:

Live frontend integration и browser E2E покрывают:

Mock provider tests остаются отдельным isolation layer для frontend-only сценариев.

Release Readiness

Текущий release status, host-app production contract и regression pack зафиксированы в:

На уровне репозитория known release blockers отсутствуют. Production-готовность зависит от host app: authentication, yii2-entity-acl policy, инфраструктура cache/db и закрытый доступ к schema write tooling.

Ограничения


All versions of yii2-base-entity-system with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
yiisoft/yii2 Version ^2.0.55
illusiard/yii2-mass-event-layer Version v0.2.0
illusiard/yii2-db-toolkit Version v0.3.0
illusiard/yii2-entity-acl Version v1.2.0
yiisoft/yii2-redis Version ^2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package illusiard/yii2-base-entity-system contains the following files

Loading the files please wait ...