Download the PHP package kynetcode/wpzylos-scaffold without Composer

On this page you can find all versions of the php package kynetcode/wpzylos-scaffold. 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 wpzylos-scaffold

WPZylos Scaffold

PHP Version WordPress GitHub

Template repository for creating production-ready WordPress plugins with MVC architecture and PHP-Scoper namespace isolation.

๐Ÿ“– Full Documentation | ๐Ÿ› Report Issues


โœจ Features


๐Ÿ“‹ Requirements

Requirement Version
PHP ^8.0
WordPress 6.0+
Composer 2.0+
WP-CLI Optional

๐Ÿš€ Quick Start

Option 1: Use as GitHub Template

Click "Use this template" on GitHub to create a new repository.

Option 2: Composer Create Project

Option 3: Clone and Customize

Initialize Your Plugin (Recommended)

After creating your project, run the Scaffold CLI to customize and manage your plugin.

Option 1: PowerShell (Windows 10/11)

Open Windows PowerShell (search "PowerShell" in Start menu):

Option 2: Command Prompt (Windows)

Open Command Prompt (cmd.exe). Since .ps1 files don't run directly in cmd, use:

Option 3: Bash (Linux/Mac/Git Bash)

For Linux, macOS, or Git Bash on Windows (install Git for Windows):

Git Bash alternative: If ./scaffold.sh doesn't work, try bash scaffold.sh


The intelligent init script handles all scenarios:

Scenario Behavior
Fresh install Detects my-plugin.php, uses scaffold defaults
Re-configure Loads .plugin-config.json, shows current values as defaults
Config deleted Auto-detects plugin from *.php with "Plugin Name:" header
Partial update Only changes modified values, shows "Skipped" for unchanged

Features:


๐Ÿ“ Project Structure


๐Ÿ”ง Customization

Automated (Recommended)

Run the Scaffold CLI for automated setup:

PowerShell:

Command Prompt:

Linux/Mac/Git Bash:

Manual

If you prefer manual customization, perform search and replace:

Find Replace With Description
my-plugin your-plugin Plugin slug (lowercase, hyphenated)
my_plugin your_plugin Scoper prefix (lowercase, underscored)
MyPlugin YourPlugin PHP namespace (PascalCase)
myplugin_ yourplugin_ Database/option prefix
My Plugin Your Plugin Display name

Files to Update

  1. your-plugin.php โ€” Plugin headers, PluginContext configuration
  2. composer.json โ€” Package name, namespace in autoload
  3. scoper.inc.php โ€” Scoper prefix variable
  4. .plugin-config.json โ€” Created by init, used by build
  5. uninstall.php โ€” Context configuration

๐Ÿ—๏ธ Core Components

PluginContext

The PluginContext class (app/Core/PluginContext.php) is the single source of truth for plugin identity. All framework components use this for prefixing.

Available Methods:

Method Returns Example
slug() Plugin slug your-plugin
prefix() Database prefix yourplugin_
textDomain() Translation domain your-plugin
version() Plugin version 1.0.0
file() Main plugin file path /path/to/your-plugin.php
path($relative) Absolute path /path/to/your-plugin/config/
url($relative) Plugin URL https://site.com/wp-content/plugins/your-plugin/
hook($name) Prefixed hook name yourplugin_custom_hook
optionKey($key) Prefixed option key yourplugin_settings
transientKey($key) Prefixed transient key yourplugin_cache
cronHook($name) Prefixed cron hook yourplugin_daily_task
tableName($name) Full table name wp_yourplugin_orders
metaKey($key) Prefixed meta key _yourplugin_data
assetHandle($handle) Asset handle your-plugin-main

Helper Functions

Global helpers available after bootstrap (app/Support/helpers.php):


โš™๏ธ Configuration

config/app.php

Service Providers

The bootstrap (bootstrap/app.php) registers framework service providers in dependency order:

  1. ConfigServiceProvider โ€” Configuration and .env loading
  2. I18nServiceProvider โ€” Internationalization
  3. HookServiceProvider โ€” WordPress hook management
  4. SecurityServiceProvider โ€” Nonce, Gate, Sanitizer
  5. HttpServiceProvider โ€” Request, Response, Pipeline
  6. ValidationServiceProvider โ€” Input validation
  7. ViewsServiceProvider โ€” Template rendering
  8. DatabaseServiceProvider โ€” Database connection
  9. MigrationsServiceProvider โ€” Schema migrations
  10. RoutingServiceProvider โ€” URL routing
  11. WpCliServiceProvider โ€” WP-CLI commands (when available)

๐Ÿ›ค๏ธ Routing

Define routes in routes/web.php:


๐ŸŽจ Frontend Build Pipeline

The scaffold includes a modern frontend stack powered by Vite, DaisyUI v5, and Tailwind CSS v4.

Install Dependencies

Development (HMR)

Starts Vite dev server with Hot Module Replacement. Define WPZYLOS_VITE_DEV in wp-config.php to load dev assets:

Production Build

Outputs optimized assets to dist/ with a manifest for ViteAssetResolver.

Switching Between Vue and React

The scaffold ships with Vue.js 3 (Options API) by default. To switch to React 19:

  1. In vite.config.js, comment out vue() and uncomment react()
  2. Update your admin entry point to import AdminApp.jsx instead of AdminApp.vue

CSS Prefix Derivation

The init scripts automatically derive a DaisyUI CSS prefix from your plugin slug (e.g., my-plugin โ†’ mp-). This prevents CSS collisions when multiple WPZylos plugins run on the same site.

The scaffold ships with PHP/Twig view support through wpzylos-views. Blade template examples are intentionally not included because the views package does not provide a Blade engine.

Shortcode Example

The scaffold includes a shortcode example that mounts a Vue/React component on the frontend via JsMount::shortcodeMount().


๐Ÿ”จ Build & Release

Development

Production Build

Use the Scaffold CLI for production builds:

Windows (PowerShell):

Windows (Command Prompt):

Linux/Mac (or Git Bash):

The build script will:

  1. Clean previous build artifacts
  2. Run phpcbf --standard=PSR12 (code style fix)
  3. Run phpstan analyze (static analysis)
  4. Install production dependencies
  5. Run PHP-Scoper for namespace isolation
  6. Copy required files & rebuild autoloader
  7. Remove development files
  8. Create versioned ZIP in dist/

Note: The build script reads configuration from .plugin-config.json (created by scaffold init).

Intelligent Features:

The production build creates a zip file at dist/your-plugin-1.0.0.zip ready for deployment.

PHP-Scoper

The scaffold includes pre-configured PHP-Scoper (scoper.inc.php) that:


๐Ÿงช Testing

Tests are located in tests/Unit/. The test bootstrap is at tests/bootstrap.php.


๐Ÿ”’ Security

The scaffold implements WordPress security best practices:

See the Security Package for detailed security utilities.


๐Ÿ› Troubleshooting

Composer create-project fails

Namespace/autoloader issues

Verify composer.json PSR-4 namespace matches your class namespace.

PHP-Scoper errors

Check scoper.inc.php and ensure WordPress functions are excluded.

Built plugin crashes

Verify WordPress symbols are excluded in scoper configuration.


๐Ÿ“ฆ Related Packages

Package Description
wpzylos-core Application foundation
wpzylos-container PSR-11 dependency injection container
wpzylos-config Configuration management
wpzylos-routing URL routing system
wpzylos-database Database abstraction
wpzylos-migrations Database migrations
wpzylos-hooks WordPress hook management
wpzylos-security Security utilities
wpzylos-validation Input validation
wpzylos-views Template rendering
wpzylos-http HTTP request/response
wpzylos-i18n Internationalization
wpzylos-wp-cli WP-CLI integration

๐Ÿ“– Documentation

For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.


โ˜• Support the Project

If you find this scaffold helpful, consider supporting the WPZylos ecosystem!


๐Ÿ“„ License

This project is licensed under the MIT License. See LICENSE for details.


๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


Made with โค๏ธ by KYNetCode


All versions of wpzylos-scaffold with dependencies

PHP Build Version
Package Version
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 kynetcode/wpzylos-scaffold contains the following files

Loading the files please wait ...