Giter Club home page Giter Club logo

wpmvc's People

Contributors

amostajo avatar garretthyder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wpmvc's Issues

v1 vs v2 vs master

Is there any explanation between these different versions? In particular, how does v1 differ from v2?

Composer error with MyApp being invalid package name

Hello,

Following the setup instructions I ran composer install and got the following error;
Deprecation warning: Your package name MyApp is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "a-z0-9/a-z0-9". Make sure you fix this as Composer 2.0 will error.

It seems Composer needs both a vendor name and package name in lowercase like;
wpmvc/my-app

Create project via composer

Example:

composer create-project --prefer-dist  wpmvc

or:

composer create-project --prefer-dist  wpmvc/theme

No work autoenqueue scripts

The function $ file-> exists (assets_path ($ asset ['asset'], $ dir) in Bridge returned false, but the file exists. Php 7.4, WP 5.7.2

Gulp 4

Migrate to gulp 4 to support node 10

Without practice

Hello, the idea is very good, but it does not exist inside the folder Controller, view, model any file.
You can not see a clear example of how it should be used.
I would also recommend programming with the PSR-4 practices

How to setup Relationships in model?

Is there any documentation or example of a Model relationship?

I have a user model and I want to get all the articles of the user, Is there any way to do so?

In my User model, I write this code:

public function tasks() {
return $this->has_many(Task::class, 'post_author');
}

And accessing this in the controller like this:
$user = new User();
$user::find(2)->tasks;

But it doesn't seem to work. I am not sure what I missed.

Unique vendor folder / Unique dependencies

Hi!

I recently discovered this plugin, before I used to develop my plugins using tombener/wp-mvc, but seems it is abandoned and also restrict due some security issues.

I was reading the Documentation and tutorials and playing with some test plugins, so I faced a funny fact:

  • There is one vendor dependencies for each plugin/theme?
  • If I decide to develop 10 plugins using this repo, so I'm going to have 10 copies of the same dependencies?

There's no way to unify this? I mean, have a single dependency's vendor folder with all the reusable libraries?

So far I could understand, we can use Wordpress with composer, I'm personally using it on my personal projects/themes/plugins, and I used to have the following structure:
image

So, maybe you guys can advise how to use 10quality/wpmvc without to duplicate this dependencies, because I really couldn't understand.

Dependencies critical issues

Hello, npm audit returns the following: 25 vulnerabilities (2 low, 2 moderate, 17 high, 4 critical).

Regards,

Class WPMVC\Commands\SetCommand Not Found

Hello,

I installed the wpmvc framework. when i try to run

php ayuco setup - I am getting this error. Also cannot find the SetCommand Class in the vendors folder

Fatal error: Class 'WPMVC\Commands\SetCommand'

No configuration file found on linux host

When I run the php ayuco setup command on my linux machine i get the following error

PHP Fatal error:  Uncaught Ayuco\Exceptions\NoticeException: addCommand: No configuration file found. in /www/app/wp-content/plugins/....../vendor/10quality/wpmvc-commands/src/Base/BaseCommand.php:58
Stack trace:
#0 /www/app/wp-content/plugins/....../vendor/10quality/wpmvc-core/src/lib/functions.php(114): WPMVC\Commands\Base\BaseCommand->__construct()
#1 /www/app/wp-content/plugins/....../ayuco(18): get_ayuco()
#2 {main}
  thrown in //www/app/wp-content/plugins/....../vendor/10quality/wpmvc-commands/src/Base/BaseCommand.php on line 58

This is due to case sensititve filesystems in Linux. I fixed it by changing the following lines in BaseCommand.php constructor

// Check for MVC configuration file
$this->configFilename = file_exists($this->rootPath . '/app/config/app.php')
? $this->rootPath . '/app/config/app.php'
: null;

like this:

// Check for MVC configuration file
$this->configFilename = file_exists($this->rootPath . '/app/Config/app.php')
? $this->rootPath . '/app/Config/app.php'
: null;

Add support for custom plugin filenaming.

Hi @amostajo

I wanted your thoughts on supporting a custom plugin filename so instead of just plugin.php users can provide their plugin with pluginname.php.

It's often the convention with WP plugin development to have your main plugin loader file the same name as your plugin.

In my current copy I've renamed plugin.php but am finding it's throwing some errors on set commands as they are looking for plugin.php and not my custom filename.

Am thinking could be implemented by adding an option to the config/app.php file with the plugin filename and if set use it for looking up the plugin file during set command replacements.

I hope that makes sense

PHP 8.0 error

Hi, we got this error when we upgrade PHP 8.0.

[28-Apr-2021 10:35:29 UTC] PHP Fatal error:  Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, array given in /10quality/wpmvc-core/src/psr4/Response.php:124

Webpack - Did you forget to signal async completion?

Hi @ALL, i'm try out your framework in one of my plugins. The Framework itself is very helpfull, thanks for that, great Job.
I get this message on gulp compilation with gulp dev, but only if the webpack.config.js is present.

[07:21:37] The following tasks did not complete: dev, scripts, webpack, webpackPromise [07:21:37] Did you forget to signal async completion?

Without the webpack.config.js it runs well.
Npm run webpack without arguments is also ok. When i use --hide-modules instead, i got a error
[webpack-cli] Error: Unknown option '--hide-modules' [webpack-cli] Run 'webpack --help' to see available commands and options
Here is the part of my dependencies in the package.json
"dependencies": { "axios": "^0.21.1", "bootstrap-icons": "^1.9.1", "gulp": "4.0.2", "gulp-wpmvc": "^1.3.*", "vue": "^3.2.37" }, "devDependencies": { "bootstrap": "^4.6.2", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" },

Webpack Configuration
`
const path = require('path');

module.exports = {
mode: 'development',
entry: {
'admin': './assets/raw/js/admin/index.js',
'app': './assets/raw/js/main.js',
},
output: {
filename: '[name].js',
path: path.resolve( __dirname, 'assets/js' ),
publicPath: './assets/js',
},
target: 'web'
};
`

and here is the gulpfile.js
`
// --------------
// START - CUSTOM TASKS

gulp.task('vendorcss', async function () {
return gulp.src([
'./node_modules/bootstrap-icons/font/bootstrap-icons.css',
])
.pipe(gulp.dest('./assets/css'));
});

gulp.task('vendorjs', async function () {
return gulp.src([
'./node_modules/vue/dist/vue.global.js',
'./node_modules/axios/dist/axios.min.js',
])
.pipe(gulp.dest('./assets/js'));
});

config.prescripts = ['vendorcss', 'vendorjs'];

// END - CUSTOM TASKS
`

All of the Setting comes from your documentation.
Do you have any idea how i can fix the async completion? It is a bug or should i use maybe one of other webpack versions?

Support Node >10

Hi @amostajo I got stuck on this for a while as I overlooked the requirement;
NodeJS (< v.10)

I kept hitting the [email protected] postinstall script issue but wasn't sure how to resolve with wpmvc. On other projects like JointsWP I was able to just bump gulp-sass in the package.json and everything was honky dory, see the bug I fixed with help on JointsWP;
JeremyEnglert/JointsWP#317 (comment)

For wpmvc I can't seem to do this as the dependency comes I believe from gulp-wpmvc or another loaded component and not the core.

If you could point me to where gulp-sass/node-sass is referenced as a dependancy hopefully we can resolve the NodeJS old version requirement with a simple version bump on the sass dependancy.

Thank you

Calling controller and cruds

The framework is well documented but i think, some essentials thinks are missing.
I can't see some Routing feature, so, how call a simple controller's method in a view (link or button) ?

Is there any sample (or plugin project) showing how doing the CRUD of a custom model ?

Thanks!

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.