-
Notifications
You must be signed in to change notification settings - Fork 7
Organize and rename PHP example directories #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mesilov
wants to merge
92
commits into
main
Choose a base branch
from
feature/12-local-app-skeleton
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reorganized PHP simple examples by moving them from `php/quick-start/simple/` to a cleaner `php/simple/` structure. Updated `README.md` to include the new structure and added descriptions for the examples. This change improves clarity and maintainability of the directory layout.
Introduce a new project skeleton for a Bitrix24 PHP SDK local app. Includes a `docker-compose.yaml` file, a `Dockerfile` for PHP CLI, a `composer.json` with required dependencies, Makefile scripts for setup and development tasks, and licensing information. Streamlines local app development using Docker and Composer.
Introduce a local application skeleton for CLI-based Bitrix24 apps. Features include a Dockerized setup, Symfony Console integration, Tailwind for assets, and logging via Monolog. Added Makefile commands for streamlined operations and PHPStan for static analysis. Signed-off-by: mesilov <[email protected]>
Introduce `Bitrix24ServiceBuilderFactory` for handling service builder creation using request data or stored tokens. Add supporting factories (`EventDispatcherFactory`, `AuthRepositoryFactory`) and listeners to manage authentication events and token storage. These additions enhance modularity and ease of service initialization. Signed-off-by: mesilov <[email protected]>
Renamed factory methods to `create` for better consistency across the codebase. Added `InstallController` to handle application installation and event processing for Bitrix24 integration, improving modularity and functionality of the application. Signed-off-by: mesilov <[email protected]>
Replaced the `getLog()` method with `create()` for registering `TestCommand` in the console application. This improves clarity and aligns the usage with updated logger factory conventions. Signed-off-by: mesilov <[email protected]>
This update transforms the application skeleton into a complete example with a user interface, token storage, and additional features like Tailwind CSS integration, new templates (header and footer), and installation scripts. It introduces enhanced functionality with Bitrix24 integration, updated documentation, and configuration changes to support both CLI and web-based interactions. Signed-off-by: mesilov <[email protected]>
Updated `install.php` to use a dedicated `InstallController` for cleaner and more structured request handling. Added better error management with meaningful logs and responses. Enhanced the documentation and adjusted related files for improved clarity and consistency. Signed-off-by: mesilov <[email protected]>
Renamed the method `createFromRequest` to `createFromPlacementRequest` for better clarity and intent. Additionally, adjusted comments for consistency and readability while loading the application profile. Signed-off-by: mesilov <[email protected]>
Reordered application installation steps for clarity and maintainability, ensuring admin auth tokens are saved earlier. Enhanced logging for event handler registration and replaced inline HTML with a cleaner conditional structure in `install.php`. Updated `.gitignore` to reflect new config file naming convention and expanded README with additional details about the installation process. Signed-off-by: mesilov <[email protected]>
Introduced Bitrix24 event handler logic via a new controller and updated the factory to support incoming events. Expanded the Makefile with clearer structure and additional commands for streamlined development processes. Signed-off-by: mesilov <[email protected]>
Change "download containers" to "download images" for clarity and accuracy in the docker-pull command description. This ensures the terminology aligns with Docker's standard usage. Signed-off-by: mesilov <[email protected]>
Updated the directory traversal logic to properly resolve the path to 'auth.json.local'. This ensures the file path is correctly calculated from two levels up, preventing potential issues with file accessibility. Signed-off-by: mesilov <[email protected]>
This commit introduces the PlacementController to handle Bitrix24 placement requests, along with corresponding changes to LoggerFactory and Bitrix24ServiceBuilderFactory to support configurable logger names. Additionally, the main entry point (`index.php`) has been added to handle incoming requests and facilitate controller processing. Signed-off-by: mesilov <[email protected]>
Convert multiple classes to readonly for immutability and improve safety. Integrate Bitrix24 API to fetch and display user profile details in TestCommand. Update console setup to include Bitrix24ServiceBuilder for API interactions." Signed-off-by: mesilov <[email protected]>
This commit introduces the foundation for the "01-empty-template" example, including a simple PHP script, Docker configuration, Makefile, and environment variables. It removes unnecessary files and components, streamlining the setup for a minimal example. Signed-off-by: mesilov <[email protected]>
Reorganized the project structure to include Docker support with a `php-cli` container for running examples. Added a `README.md` detailing the folder structure, architecture, and usage instructions. Updated necessary configuration files such as `.env`, `Makefile`, and `docker-compose.yaml` for the new setup. Signed-off-by: mesilov <[email protected]>
Introduced a structured setup with Docker, Makefile, and environment configuration for running a PHP example to call Bitrix24 REST API using cURL. This includes a Dockerfile, docker-compose configuration, and updated README instructions for setup and usage. Added `.env` support for managing webhook URLs securely. Signed-off-by: mesilov <[email protected]>
Deleted the `.gitignore` and `README.md` files as they are no longer required. This cleanup streamlines the repository by removing redundant content. Signed-off-by: mesilov <[email protected]>
Introduce a new example showcasing how to work with the Bitrix24 PHP SDK using incoming webhooks. Includes a Dockerized PHP CLI container, updated dependencies, example code, and documentation for better development and reproducibility. Signed-off-by: mesilov <[email protected]>
Renamed the folder and files for clarity and updated the README with instructions on using the webhook cURL call example. Introduced a `.env.local` file for local overrides and adjusted related configurations to support the changes. Signed-off-by: mesilov <[email protected]>
The directory name was updated from "02-webhook-curl-call-without-sdk" to "02-webhook-curl" for better readability and brevity. All associated files were adjusted to reflect the new path structure. This change improves clarity and consistency across the project. Signed-off-by: mesilov <[email protected]>
Introduced a complete example demonstrating how to use Bitrix24 PHP SDK to interact with REST APIs via an incoming webhook. Includes source code, Docker setup, Makefile commands, and detailed instructions in the README for environment configuration and usage. Signed-off-by: mesilov <[email protected]>
Deleted files related to the Bitrix24 PHP SDK webhook example, including Docker configuration, source code, environment file, dependency configuration, and ignored files. This cleanup removes outdated or unnecessary codebase components. Signed-off-by: mesilov <[email protected]>
Updated "help" section formatting in Makefiles for better clarity. Added `composer.lock` to lock dependencies for the new webhook SDK example, ensuring consistent builds and dependency management. Signed-off-by: mesilov <[email protected]>
Introduce logging with Monolog for better application insights and add Docker setup for streamlined development. Updated documentation, Makefile, and dependencies to enhance usability and clarify usage steps. Signed-off-by: mesilov <[email protected]>
Introduced the `RobotHandlerMetadata` class for defining robot metadata. Enhanced the Weather robot example by refining robot responses, adding result metadata via the `Result` class, and improving handling methods with additional parameters and default values for flexibility. Signed-off-by: mesilov <[email protected]>
…ndlers Integrated Symfony DI and services.yaml for dependency injection configuration. Added implementations for handling robots, including `Discount` handler and demo `crm-robot-handler` entry points. Upgraded composer dependencies to latest versions for improved compatibility. Signed-off-by: mesilov <[email protected]>
Updated services.yaml to configure LoggerFactory with a factory method and set public visibility for new service classes. Adjusted DI implementation to add exception handling. Replaced direct logger initialization with DI in crm-robot-handler.php for consistency and cleaner dependency management. Signed-off-by: mesilov <[email protected]>
…ging Introduced a new example demonstrating webhook integration with Symfony DI and PSR-3 compatible logging. Added services configuration, example classes (Alpha, Beta, Gamma), and an example.php script showcasing DI usage and logging. Enhanced project structure with Docker support, linters, and updated Makefile for streamlined development. Signed-off-by: mesilov <[email protected]>
Added new dependencies required for the "06-webhook-sdk-di" example, focusing on Bitrix24 REST API integration, dependency injection, and PSR-based logging. Ensures compatibility with the latest package versions. Signed-off-by: mesilov <[email protected]>
… example Improved object initialization in `example.php`, ensuring cleaner usage of dependency injection. Enhanced README structure with additional sections, links, and commands for better clarity and guidance. Signed-off-by: mesilov <[email protected]>
Updated `README.md` and `Makefile` to reflect the inclusion of a dependency injection (DI) container. Improved folder structure descriptions and included new references to DI-related configurations and services. Signed-off-by: mesilov <[email protected]>
…s and DI improvements Introduced enhancements to the local application robots example, including new `Discount` robot, integration with DI for `EventDispatcher`, and improved robot metadata handling. Added `InstallController` and `Bitrix24EventController` for streamlined installation and event management workflows. Expanded configurations with updates to `services.yaml`, Docker setup, and logging. Signed-off-by: mesilov <[email protected]>
…dlers and DI configuration Introduced a new example for local applications showcasing Weather activity handling with improved dependency injection. Added Docker support, handler interfaces, metadata classes, and Symfony service definitions. Updated README and included supporting files such as `.env`, `.php-cs-fixer.php`, and `.gitignore`. Signed-off-by: mesilov <[email protected]>
Deleted the example showcasing local application robots, including custom handlers and event handling, to streamline project structure. Removed related PHP CLI setup, logger initialization, and supporting files. Signed-off-by: mesilov <[email protected]>
…nd Monolog integration Introduced a new example showcasing webhook integration with Sentry logging and Symfony Dependency Injection. Added Docker configuration, Makefile commands, centralized LoggerFactory with rotating file handler setup, and `.env` configuration for enhanced flexibility. Updated composer dependencies to support new features. Signed-off-by: mesilov <[email protected]>
…and Bitrix24 integration Introduced a comprehensive example demonstrating local application workflows with Bitrix24 SDK integration. Added CLI command (`TestCommand`), controller classes for handling events, placements, and installations, as well as centralized logging with `LoggerFactory`. Configured dependency injection through `services.yaml` and implemented a repository factory for auth handling. Included Docker support, bootstrap setup, and enhanced code structure for flexibility and modularity. Signed-off-by: mesilov <[email protected]>
Enhanced the example with Sentry support, showcasing advanced logging and error monitoring. Configured Sentry DSN, release, and environment in `.env`, added Sentry handlers in `LoggerFactory`, and demonstrated usage in `example.php`. Introduced new service classes (`Alpha`, `Beta`, `Gamma`) to illustrate structured error handling and trace collection. Updated documentation and dependencies accordingly. Signed-off-by: mesilov <[email protected]>
…ture and added Sentry link Enhanced documentation with additional sections, formatting fixes, and a link to Sentry resources. Improved readability and guidance for setup and usage. Signed-off-by: mesilov <[email protected]>
Added support for starting workflows and listing workflow instances in the `TestCommand`. Updated user prompts for better clarity. Enhanced Bitrix24 SDK integration to streamline workflow operations. Signed-off-by: mesilov <[email protected]>
Added support for terminating and killing workflows via CLI. Included user prompts, response messages, and relevant API documentation links for both actions. Enhanced Bitrix24 SDK integration for streamlined workflow management. Signed-off-by: mesilov <[email protected]>
…xample Signed-off-by: mesilov <[email protected]>
…xample script Signed-off-by: mesilov <[email protected]>
Included the composer.lock file to lock dependencies for the example. This ensures consistent builds and dependency resolution. Updated packages and dependency versions in the project. Signed-off-by: mesilov <[email protected]>
…dency management Added a new example demonstrating batch CLI operations using Bitrix24 SDK. Configured Symfony Console, Monolog for logging, and dependency injection. Included composer.json for explicit dependency management and new `bin/console` file for CLI execution. Updated file paths for logs and imports. Signed-off-by: mesilov <[email protected]>
…d and extended logging Added `b24:data-generator` command for generating and saving demo contacts in CSV format. Configured log levels and rotation settings in `.env` and `docker-compose.yaml`. Extended Makefile with updated command descriptions and improved formatting. Updated `.gitignore` to include new `volumes` directory. Signed-off-by: mesilov <[email protected]>
…ith improved CLI functionality Introduced `b24:import-data` command to import demo data into Bitrix24. Updated `Makefile` with the new command, registered `ImportDataCommand` in Symfony Console and `services.yaml`. Renamed demo data file in `DataGeneratorCommand` for consistency. Enhanced CLI usability with extended functionality. Signed-off-by: mesilov <[email protected]>
…I calls Updated `ImportDataCommand` to process contacts from a CSV file and import them into Bitrix24 using batch API calls. Added support for progress indicators and error messaging for missing demo files. Extended dependencies in `composer.json` to include `symfony/debug-bundle`. Updated `composer.lock` accordingly. Signed-off-by: mesilov <[email protected]>
…ith export functionality Introduced `b24:export-data` command to export demo data from Bitrix24, supporting progress indicators and logging. Updated Symfony Console configuration, `Makefile`, and `services.yaml` to register the new command. Enhanced CLI usability with extended functionality and example coverage. Signed-off-by: mesilov <[email protected]>
… maintainability Renamed variables for clarity across commands and updated type definitions. Introduced readonly properties in `DI` for immutable dependencies. Enhanced progress bar messaging and added detailed operation time in `b24:import-data`. Applied minor refinements to CSV handling logic in both data generation and import commands. Signed-off-by: mesilov <[email protected]>
Added SIGINT and SIGTERM signal handling to `ImportDataCommand` for proper termination. Enhanced feedback with SymfonyStyle and replaced direct output calls. Refined data processing, error handling, and progress bar updates for improved CLI usability. Updated `composer.json` to reference `bitrix24/b24phpsdk` as `dev-dev`. Signed-off-by: mesilov <[email protected]>
Added SIGINT and SIGTERM signal handling to `ExportDataCommand` for proper termination. Transitioned to SymfonyStyle for consistent CLI output, replacing direct output calls. Improved feedback messaging, progress bar updates, and data export process for enhanced user experience. Signed-off-by: mesilov <[email protected]>
…der structure in README Added throttling logic to `ImportDataCommand` to manage Bitrix24 API rate limits. Incorporated wait time processing and improved progress bar messaging. Updated the README with revised folder structure details for improved clarity. Signed-off-by: mesilov <[email protected]>
Updated `ImportDataCommand` and `ExportDataCommand` to include `#[Override]` annotations on signal handling methods. Refactored CLI output for consistent use of `SymfonyStyle`. Enhanced progress bar and feedback messaging for improved user interaction. Signed-off-by: mesilov <[email protected]>
…nd reference documentation Expanded the README to include more detailed usage instructions for Docker, Makefile, and CLI commands. Added a comprehensive "Must read documentation" section with links to infrastructure, CLI utilities, application references, and PHP linters for improved developer guidance. Signed-off-by: mesilov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reorganized PHP simple examples by moving them from
php/quick-start/simple/
to a cleanerphp/simple/
structure. UpdatedREADME.md
to include the new structure and added descriptions for the examples. This change improves clarity and maintainability of the directory layout.