Giter VIP home page Giter VIP logo

php-template's Introduction

BrokerAPI

Software License

BrokerAPI is a wrapper for Message-driven API's built on top of most used industry plugins such as PHP AMQP lib for RabbitMQ. It is built for usage altogether with AsyncAPI specs and generators

Structure

The structure for this plugin is as follows

filters/
partials/
template/
utilities/

Requirements

You need to have the following versions of npm+node installed:

v12.16+ < Node.js < 15
v6.13.7+ < npm < 7

Install

You need to have the asyncapi/generator installed and a valid AsyncAPI specification file.

$ npm install -g @asyncapi/generator

Usage

Refer to the /examples folder for further examples

./utilities/generate.sh -o {output} -s {sourceYamlFile}

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

php-template's People

Contributors

asyncapi-bot avatar codingtenshi avatar derberg avatar emilianozublena avatar maniktherana avatar mvehar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-template's Issues

Getting this template released

@emilianozublena hey, wanted to check with you what are your plans for this template. If you still want to maintain it, as I was thinking, basing on the fact that it got contribution and there are starts, that we should finally release it as official asyncapi template.

But of course it makes sense only if it is going to be maintained

Plan for standing up PHP template and continued development

Reason/Context

Now that there seems to be interest in this template, we need to fix a couple of things, probably add more support for other async driven technologies (currently it only supports RabbitMQ) and other stuff we deem important.

In order for us to start chatting about next steps i've started this issue @Ferror, so please let me know your thoughts or where would you like to contribute.

Initially i had these in mind:

  • Pump unit tests
  • Change how the template is creating code (right now Publisher & Consumer classes are intertwined)
  • Maybe migrate to the new React template?
  • Add more support (i'd say if we have Rabbit working we could make it work with Kafka & Google Pub/Sub maybe? i think those are the most used ones)

AsyncAPI spec v3 support in PHP Template

Reason/Context

This Issue is used to track changes needed to support AsyncAPI v3. As a code owner, please edit this list of TODO tasks in order to properly track the progress ๐Ÿ™‚ Once this issue is closed it means that v3 is now fully supported in this library.

Remaining tasks:

Fix invalid links in the Markdown files

Reason/Context

We have recently started validating links in the markdown files across all of the repositories across the organization.
As I can see in the latest check by the time of writing this issue, there are some invalid links in some markdown files that need fixing.

How to Resolve the issue?

  1. If you haven't read our contributions guide, please give it a read to see how contribution works in AsyncAPI.
  2. open the latest run of the Check Markdown Links and fix them in your own fork (you can test if the check passes by running the Check Markdown links (Weekly) in your own fork).
  3. Open a Pull Request with the changes.

How to fix the links

  • If the link is moved to a new place, edit the link to point to the appropriate place.
  • If it is not supposed to be checked or it is a sample URL, add it to the ignorePatterns section of mlc_config.json at the root of the repo.
  • If you still don't know what to do with a specific link, ask the maintainers for help.

Examples

If you still have some issues, please check some example fixes in other repositories:
asyncapi/spec#769
asyncapi/parser-js#540
asyncapi/glee#288
asyncapi/java-spring-template#219

Need for urgent changes in GitHub Actions automation

This issue defines a list of tasks that need to be performed in this repo to make sure it's ci/cd automation works long term without any issues.

It is up to maintainers to decide if it must be addressed in one or multiple PRs.

Below are 3 different sections describing 3 different important ci/cd changes.

IMPORTANT-START
For GitHub workflows that contain This workflow is centrally managed in https://github.com/asyncapi/.github/ you do not have to perform any work. These workflows were already updated through the update in .github. The only exception is the workflows related to nodejs release. More details in Upgrade Release pipeline - in case of nodejs projects section
IMPORTANT-END

Deprecation of way data is shared between steps

Every single GitHub Action workflow that has echo "::set-output name={name}::{value}" need to be updated to follow echo "{name}={value}" >> $GITHUB_OUTPUT

We do not yet know when set-output will stop working. Previous disable date was 31.05 but now then say community needs more time.

For more details read official article from GitHub

Deprecation of node12

2nd bullet point is still relevant for you even if your projects in not nodejs project

  • Every single workflow that uses setup-node action needs an update to follow v3 version of this action, and make sure minimum node 14 is used
  • Now this part is more complex. Problem with node12 is that node-based GitHub Actions were using it in majority as a runtime environment. Look for example at this action.yaml file for setup-node action v2. So the job that you have to do is go through all the workflows, and verify every single action that you use, make sure you are using the latest version that is not based on node12. I already did review a lot of actions as part of this PR so maybe you will find some actions there and can copy from me. For example action/checkout needs to be updated to v3.

Node12 end of support in action is probably September 27th.

For more details read official article from GitHub

Upgrade Release pipeline - in case of nodejs projects

ignore this section if your project is not nodejs project

You have 2 options. You can:

A. choose to switch to new release pipeline using instruction from asyncapi/.github#205

B. stay with old release pipeline, and manually update GitHub workflows and actions used in it, you can inspire a lot from this PR asyncapi/.github#226

I definitely recommend going with A

Workflows related to release:

  • .github/workflows/if-nodejs-release.yml
  • .github/workflows/if-nodejs-version-bump.yml
  • .github/workflows/bump.yml

Some anonymous messages are not PSR-4 compliant

Adding hook fixes that:

function toCamelCase(text) {
    return text.replace(/-\w/g, clearAndUpper);
}

function toPascalCase(text) {
    return text.replace(/(^\w|-\w)/g, clearAndUpper);
}

function clearAndUpper(text) {
    return text.replace(/-/g, "").toUpperCase();
}

function clearArrows(text) {
    return text.replace(/[<>]+/g, "");
}

module.exports = {
    'setFileTemplateName': (generator, hookArguments) => {
        const currentFilename = hookArguments.originalFilename;

        return toPascalCase(clearArrows(currentFilename))
    }
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.