lukaskleinschmidt / kirby-types Goto Github PK
View Code? Open in Web Editor NEWIDE Helper for Kirby
License: MIT License
IDE Helper for Kirby
License: MIT License
Hi Lukas,
I am once again evaluating this wonderful plugin! Fantastic work! I had one issue come up though:
The type definition file type hints the return type for my Site
and Page
fields with \Kirby\Cms\Field
, however the correct class would be \Kirby\Content\Field
from Kirby 4.0 onwards. Since ˙\Kirby\Cms\Field` is deprecated, I think the new class namespace should be used.
\Kirby\Cms\Field
is actually aliased to Kirby\Content\Field
, but apparently the deprecated aliases are not added to the type definition file. Is there a specific reasoning behind this?
I can provide a PR, but I first wanted to hear your thoughts!
Cheers
When defining fields like this:
fields:
backgroundColor:
extends: fields/colors
label: Background Color
the plugin expects somewhere in the field definition a "type" key, but here only "extends" and "label" are present.
The output of the console is:
kirby-types v1.1.1 types:create
✓ added blueprints fields
Undefined array key "type"
Hi Lukas,
thanks for this plugin. I wanted to try it out, but when I run kirby types:create
it fails due to /types.php
not being writable. This path made me suspicious and as far as I gathered from the code, the path should have been prepended with the Kirby base
root. I have this root set up in my index.php
but apparently these are ignored by Kirby CLI and base
does not seem to be a default root? When I run kirby roots
it also does not list a base
root.
Any idea what might be the issue? I don't have much experience with the Kirby 3 CLI, but I am happy to provide more information. Just let me know.
Best
Edit: The Kirby version used is 3.9.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.